问题:单选题Whichensp;canensp;beensp;usedensp;toensp;encodeensp;charSensp;forensp;output?()A Java.io.OutputStream.B Java.io.OutputStreamWriter.C Java.io.EncodeOutputStream.D Java.io.EncodeWriter.E Java.io.BufferedOutputStream....
查看答案
问题:单选题11.classA { 12. public void process() { System.out.print(”A “); } } 13. class B extends A { 14. public void process() throws RuntimeException { 15. super.process(); 16. if (true) throw new RuntimeException(); 17. System.out.print(“B”); }} 18. pu...
问题:public class X { public object m () { object o = new flo...
问题:单选题1. public class ForBar { 2. public static void main(String []args) { 3. int i = 0, j = 5; 4. tp: for (;;) { 5. i ++; 6. for(;;) 7. if(i --j) break tp; 8. } 9. system.out.printIn(“i = ” + i + “, j = “+ j); 10. } 11. } What is the resu...
问题:The 8859-1 character code for the uppercase letter A is 65. ...
问题:单选题public class AssertStuff { public static void main(String [] args) { int x= 5; int y= 7; assert (x y): “stuff”; System.out.println(”passed”); } } And these command line invocations:java AssertStuff java -ea AssertStuff What is the result?()A p...
问题:public class X implements Runnable( private int x; priv...
问题:Which are not Java keywords? () ...
问题:多选题11. public interface Status { 12. /* insert code here */ int MY_VALUE = 10; 13. } Which three are valid on line 12?()AfinalBstaticCnativeDpublicEprivateFabstractGprotected...
问题:Which of these are keywords in Java?() ...
问题:int i = 0; while (true) { if(i==4) { break; } ++i; } S...
问题:填空题3. string foo = “ABCDE”; 4. foo.substring(3); 5. foo.concat(“XYZ”); 6. Type the value of foo at line 6.()...
问题:Which of the following fragments might cause errors?() ...
问题:public class X { public static void main(String [] args) { ...
问题:多选题Which statements concerning the value of a member variable are true, when no explicit assignments have been made?()AThe value of an int is undetermined.BThe value of all numeric types is zero.CThe compiler may issue an error if the variable is used bef...
问题:多选题Which two demonstrate encapsulation of data?()AMember data have no access modifiers.BMember data can be modified directly.CThe access modifier for methods is protected.DThe access modifier to member data is private.EMethods provide for access and modif...
问题:单选题Which gets the name of the parent directory file “file.txt”?()A String name= File.getParentName(“file.txt”);B String name= (new File(“file.txt”)).getParent();C String name = (new File(“file.txt”)).getParentName();D String name= (new File(“file.txt”...
问题:public class MyLogger { private StringBuilder logger = new ...
问题:Which statement is true?()...
问题:单选题Which statements, when inserted at the indicated position in the following code, will cause a runtime exception when attempting to run the program?() class A {} class B extends A {} class C extends A {} public class Q3ae4 { public static void...