To end an application pass this as the argument to the JFrame class’s setDefaultCloseOperation () method. -JFrame.END_ON_CLOSE JFrame.EXIT_ON_CLOSE JFrame.CLOSE_NOT_HIDE END_ON_CLOSE What will happen when the following statement is executed? x.setEditable(false): The text field x will be editable The text field x will be made read-only. The boolean variable x will be set to false. The boolean variable x will be editable For the following code, how many times would the while loop execute? SftringTokenizer strToken = new stringTokenizer (“Cars, trucks, and suvs ” + “are all types of automobiles. “): while (strToken.hasMoreTokens()) { System.out.printiln {strToken.next.Token ()): } 5 1 7 9 In a string that contains a series of words or other items of data separated by spaces or other characters, the programming term for the data items is separator delimiter buffer token Look at the following code. Line 1 public class classA Line 2 { Line 3 public classA() () Line 4 public void methed1(int a){} Line 5 } Line 6 public class ClassB extends ClassA Line 7 { Line 8 public Class() {} Line 9 public void method1 (){} Line 10 } Line 11 public class ClassC extends ClessB Line 12 { Line 13 public ClassC () {} Line 14 public void method1 () {} Line 15 } Which method1 will be executed when the following statements are executed? Class?, item1 = new ClassB (): item1.method1(): Line 9 Line 14 Line 4 This is an error and will cause the program to crash.
Expert Answer
instruction: I gave little explanation and direct answer i will writen in this context.
26)To end an aplication,pass this as an arguement to the JFrame classe’s set DefaultcloseOperation() method?
–Answer: JFrame.EXIT_ON_CLOSE , Creating Windows
27)what can happen when the following code can be excuted?..
x.seteditable(false)
–Answer: The text field x will be made read-only , Read—Only Text Fields
28)for the following code how many times would the while loop execute?
—–Answer: 9 time ,because String tokenizer will default work on whitespace as a seperator.
29)In a string that contains a series of words or other items of data seperated spaces and other characters ,the programming term ?
–Answer:Delimiter, String tokenizer will default work on whitespace as a delimitor.
30)classA item1 = new classB();
item1.method1();
–Answer:Line 14, As of the method overriding concept the implicitly in the multiple inheritence cocept