Question: questions Analyze the following code: int i = 3434: double d = 3434: System.out.printf(%5.1f %5.1f, I, d): A) i is an integer, but the format

questionsquestions Analyze the following code: int i = 3434: double d =

3434: System.out.printf("%5.1f %5.1f", I, d): A) i is an integer, but the

Analyze the following code: int i = 3434: double d = 3434: System.out.printf("%5.1f %5.1f", I, d): A) i is an integer, but the format specifier %5.1f specifies a format for double value. The code has an error. B) The code complies and runs fine to display 3434.0 3434.0 C) The code complies and runs fine to display 3434 3434.0 ____ To add 0.01 + 0.02 + .. + 1.00, what order should you use to add the numbers to get better accuracy? A) add 0.01, 0.02, .., 1.00 in this order to a sum variable whose initial value is 0. B) add 1.00, 0.99, 0.98, .., 0.02, 0.01 in this order to a sum variable whose initial value is 0. ____ (char)('a' + Math random() = ('z' = 'a' + 1))returns a random character ____ between 'b' and 'z' between 'a' and 'y' between 'b' and 'y' between 'a' and 'z' ___ Suppose int i = 5, which of the following can be used as an index for array double[] t = new double[100]? (Choose all that apply.) A) (int)(Math.random() = 100) B) i C) i + 6.5 D) Math.random() = 100 E) i + 10 ____ Suppose you wish to provide an accessor method for a Boolean property finished, what s9ignature of the method should be? Public Boolean getFinished() Public Boolean isFinished() Public Boolean isFinished() Public Boolean getFinished() ____ Assume StringBuilder strBuf is "ABCCEFC", after invoking ___, strBfr contains "ABTTEFT". strBfr.replace("C", "T") strBfr.replace("CC", "TT") strBfr.replace('C', 'T') strBfr.replace(2, 7, "TTEFT") strBfr.replace('C', "TT") ____ Which of the following statements are true? (Choose all that apply.) A method can be overridden in the same class. If a method overrides another method, these two methods must have the same signature. If a method overloads another method, these two methods must have the same signature. A method can be overloaded in the same class. _____ Analyze the following code: public class Test { public static void main (String[] args) { String s = new String("Welcome to java"): Object o = s: String d = (String)o: } } When casting o to s in String d = (String)o, the contents of o is changed. When casting o to s in String d = (String)o, the a new object is created. s, o, and d reference the same String object. When assigning s to o in Object o = s, a new object is created. _____ What is the output of the following code? char ch = 'F": if(ch > = 'A" && ch

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!