I\'m learning java, but I don\'t understand thesequestions... Can you help me? T
ID: 3613984 • Letter: I
Question
I'm learning java, but I don't understand thesequestions... Can you help me? Thank you!1. What is the output produced by the following?
String verbPhrase = "is money";
System.out.println("Time" + verbPhrase);
2. What is the output produced by the following?
String test = "abcdef";
System.out.println(test.length( ));
System.out.println(test.charAt(1));
3. What is the output produced by the following?
String test = "absdef";
System.out.println(test.substring(3));
4. What is the output produced by the following?
System.out.println("abc def");
5. What is the output produced by the following?
String test = "Hello, everyone");
test = test.toUpperCase( );
System.out.println(test);
6. What is the output produced by the following?
System.out.println("2 + 2 = " + (2+2));
I'm learning java, but I don't understand thesequestions... Can you help me? Thank you!
1. What is the output produced by the following?
String verbPhrase = "is money";
System.out.println("Time" + verbPhrase);
2. What is the output produced by the following?
String test = "abcdef";
System.out.println(test.length( ));
System.out.println(test.charAt(1));
3. What is the output produced by the following?
String test = "absdef";
System.out.println(test.substring(3));
4. What is the output produced by the following?
System.out.println("abc def");
5. What is the output produced by the following?
String test = "Hello, everyone");
test = test.toUpperCase( );
System.out.println(test);
6. What is the output produced by the following?
System.out.println("2 + 2 = " + (2+2));
Explanation / Answer
please rate - thanks String verbPhrase = "is money"; System.out.println("Time" +verbPhrase); Timeismoney nospace between Time and is, since you didn't put one 2. What is the output produced by the following? String test = "abcdef"; System.out.println(test.length()); 6 length of the string System.out.println(test.charAt(1)); b character #1 3. What is the output produced by the following? String test = "absdef"; System.out.println(test.substring(3)); def substring starting at index 3 4. What is the output produced by the following? System.out.println("abc def"); abc abc on 1 line says go to next line and prints def def 5. What is the output produced by the following? String test = "Hello, everyone"); ) is an error test = test.toUpperCase(); change the string to all upper case System.out.println(test); HELLO, EVERYONE 6. What is the output produced by the following? System.out.println("2 + 2 = " +(2+2)); 2 + 2 = 4
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.