填空题
Public class test (
Public static void stringReplace (String text) (
Text = text.replace (‘j’ , ‘i’);
)
public static void bufferReplace (StringBuffer text) (
text = text.append (“C”)
)
public static void main (String args[]} (
String textString = new String (“java”);
StringBuffer text BufferString = new StringBuffer (“java”);
stringReplace (textString);
BufferReplace (textBuffer);
System.out.printLn (textString + textBuffer);
)
)
What is the output?()
JAVAJAVA
相关考题
-
填空题
Public class test ( Public static void main (String args[]) ( System.out.printIn (6 ^ 3); ) ) What is the output?() -
单项选择题
public class test ( private static int j = 0; private static boolean methodB(int k) ( j += k; return true; ) public static void methodA(int i)( boolean b: b = i < 10 | methodB (4); b = i < 10 || methodB (8); ) public static void main (String args[])( methodA (0); system.out.printIn(j); ) ) What is the result?()
A. The program prints “0”
B. The program prints “4”
C. The program prints “8”
D. The program prints “12”
E. The code does not complete. -
多项选择题
Integer i = new Integer (42); Long 1 = new Long (42); Double d = new Double (42.0); Which two expressions evaluate to True?()
A. (i ==1)
B. (i == d)
C. (d == 1)
D. (i.equals (d))
E. (d.equals (i))
F. (i.equals (42)
