Menu

Ti 8 Execution Result Following Code Segment Suppose S Included Within Otherwise Correct P Q43808219

#TI* 8. The execution result for the following code segment (suppose its included within an otherwise correct program) int x#TI* 8. The execution result for the following code segment (suppose it’s included within an otherwise correct program) int x2: String sup (x (15) sall:(x < 22)? “tiny”: “huge” System.out.println(sup); A. small B.tiny C. huge D. Compilation error 9. Which method in the following can NOT be defined within an interface? A. private int petAreas B. public float getVol(float x) C. public void main(String[] args) D. boolean dagBoolean 10. What’s the result when the following program is ee n import java.awt. import javax.swing.”; public class ButtonTest extends Frame public ButtonTest() { Button helloButton Button(“Hello”): JButton byebutton new JButton(“bye”); add(helloButton); add(byeButton); setSize(200, 100); setVisible(true); public static void main(String args[]) new ButtonTest(); A. A frame with two expanded buttons: Hello on the left and Bye on right B. A frame with only one expanded button Hello C. A frame with only one expanded button Bye D. A frame with two buttons on the top area: Hello and Bye Section B-READ AND ANSWER (35 marks) 1. Read the programs/fragments, and write the output. How may me the order and within otherwise correct program. (20 marks in total with 4 marks each) 1) public class Examples public static void main(String!] args) { int lay -4; for(int i = 1; 1 lay: f++){ for(int k = 1; k clay – f; k++) { Show transcribed image text #TI* 8. The execution result for the following code segment (suppose it’s included within an otherwise correct program) int x2: String sup (x (15) sall:(x

Expert Answer


Answer to #TI* 8. The execution result for the following code segment (suppose it’s included within an otherwise correct program) …

OR