(Extra Credits 2 pts) What is the output of the following program? public static void main(String[] args){ String obj = “hello”; String obj1 = “world”; String obj2 = obj; obj2 = “world”; System.out.println(obj + ” ” + obj2);}
What is the output of the following Java code? public stat…
What is the output of the following Java code? public static void main(String[] args) { String s1 = “Hello World”; int len = s1.length(); System.out.println(len++);}
(Extra Credits 4 pts) What is the output of the following pr…
(Extra Credits 4 pts) What is the output of the following program? A byte has a range from -128 to 127, both inclusive. public static void main(String num -= 56; System.out.println(num); // output: }
What is the output of the main method’s execution? public st…
What is the output of the main method’s execution? public static void main(String[] args) { int a = 5; int b = a–; a = 10; System.out.print(b);}
What combination of values for integer variables a and b cau…
What combination of values for integer variables a and b cause the following code block to print “Branch 2”? if (a < 10 && b < 10) { System.out.print("Branch 1");} else if ((a < 10 && b > 25) || (a > 25 && b < 10)) { System.out.println("Branch 2");} else if (a > 25 && b > 25) { System.out.println(“Branch 3”);}
What is the output of the following code?int num = 18;if (nu…
What is the output of the following code?int num = 18;if (num < 50 || 1 < 12 && num > 30) System.out.println(“True”);else System.out.println(“False”);
Convert the following: Decimal value, 25 into binary [dtb]…
Convert the following: Decimal value, 25 into binary Octal value, 25 into binary Hexadecimal value, 25 into binary Do not enter prefixes or pad 0’s to the left. Your answer should be a combination of 0’s and 1’s.
Who/what writes source code?
Who/what writes source code?
(Extra Credits 5 pts) What is the output of the following pr…
(Extra Credits 5 pts) What is the output of the following program? public static void main(String[] args) { int rows = 4; int sum = 0; for(int i = 1; i
What is the output of this block of code? public static void…
What is the output of this block of code? public static void main(String[] args){ int checkThis = 6; switch(checkThis) { case 1: System.out.print(“What “); break; case 3: System.out.print(“we “); break; case 4: System.out.print(“do “); case 5: System.out.print(“in “); case 6: System.out.print(“life “); case 8: System.out.print(“echoes “); case 9: System.out.print(“in “); default: System.out.print(“eternity.”); }}