Question: Please help me this JAVA question... 1) a) How many String objects are created when the following code executes? String name1 = new String(Joe); String
Please help me this JAVA question...
1)
a) How many String objects are created when the following code executes?
String name1 = new String(Joe);
String name2;
name2 = Jim;
name1 = name1.toLowerCase();
b) Complete the Java code for the following for loop:
for (int i = 1; i <= 6; i++){
// your code here
}
So that it prints the following numbers, one per line:
-4
14
32
50
68
86
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
