Some basic questions in Java

zhaozj2021-02-12  147

1. String a = "abc"; string b = new string ("abc"); system.out.println (a == "abc"); System.out.Println (b == "abc"); system. Out.println (a == b); system.out.println (a.equals ("abc")); system.out.println (B.Equals ("ABC"));

Output results? Explain why this result? 2. String aaa = null; string aaaa = ""; system.out.println (aaa == null); system.out.println (aaaa == null); string abc = aaa "ttt"; system.out.println (ABC);

Output results? Explain why this result? 3.PUBLIC CLASS A1 {Public Int Aa = 0; Class A2 {Public Int Aa = 1;} Public Void Init () {Class A3 {Public Int Aa = 2;}}} Compile Results There are several clas? And SCOPE?

4. Int [] [] a1 = {{110, 120}, {210, 220}}; int [] [] A2 = {{11, 12, 13} {21, 22, 23}, {31, 32, 33}} System.ArrayCopy (A1, 0, A2, 0, A1.LENGTH);

What is the result of output A2? why?

转载请注明原文地址:https://www.9cbs.com/read-7029.html

New Post(0)