Question: Need help with these java questions 1. (1 point) State the value of true falsetrue) 2. (1 point) State the value of (int)( Math.round( Math.max
1. (1 point) State the value of true falsetrue) 2. (1 point) State the value of (int)( Math.round( Math.max 2.5, 3.5))) 3. (2 points) Answer two permissible data types for x in a switch statement of the form switch xf... 4. (1 point) State the value of (char)A6). 5. (3 points) Give a formula that uses Math.random in it and generates a random integer greater than or equal to 1 and less than or equal to 20. 6. (5 points) Suppose w is a String variable with the value "John.Mayall.and. John. Mayer" (the double quotation mark is not part of the String). (a) (2 points) State the method call on w, along with its actual parameters, that returns " John. Mal1.and. John. Mayer" (the double quotation mark is not part of the String). (b) (2 points) State the value of w immediately after the above method call. (e) (a point) State the value of w.startakith joha" ). 7. (3 points) The following code fragment will produce three lines of output 1 String input"Emma" 2 StringBuilder builder nev StringBuilder( input 3 builder.insert C0, input.toUpperCase)); 4 builder.append input.toLoverCase); 5 System.out.println( builder.toString ) 6 System.out.println( input.lastIndexof"m 7 System.out.println( input.startswith input); State the three lines of output
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
