Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 15 (2.5 points) Which ot the following statements opens a fle named Data. txt and reads data from it? A) Printwiter inputFile new PrintWriter

image text in transcribed
image text in transcribed
image text in transcribed
Question 15 (2.5 points) Which ot the following statements opens a fle named Data. txt and reads data from it? A) Printwiter inputFile new PrintWriter "Data.txt") B) scanner inputrile - new scanner"Data.x" C) File file new File ("Data.txt"); scanner inputrile new scanner (file) D) File scanner new File ("Data.txt") Question 16 (2.5 points) The scope of a variable is limited to the block in which it is defned True switch (status) case 10: system out.printin"Hello class"); break; case 20: system.out.printin ("Hello case 30: Question 17 (2.5 points) What will the output be if the value in variable status is 28 switch (status) case 10: 10 11 12 system.out.println("Hello class") break: case 20: 131415 system.out.println ("Hello case 30: 16 1718 System.out.printin("world!") break 19 20 21 case 4o: System.out.printin ("Goodbye"): break: 22 23 24 25 26 27 )Goodbyo 282 30 313233 343s 36 Question 18 12 5 points) entire expression evaluates to true or false True False Question 19 (2.5 points) Which statement will show the dialog box below? JOptionPane showinputDialog ("Hello World"); OptionPane.showMessageDialog("Hello World nul OptionPane.showlnputDialog (null, "Hello World" JOptionPane.showMessageDialog (null, "Hello World" 18 2021 Question 20 (2.5 points) 23 24 What information can you retrieve from the following command javac Test java 26 27 A) It 29 30 B) The name of the main method of the program is Test 32 33 D) The name of the das of the program is Test 4 35 36 Question 21 (2.5 points) 73s|3 This section of a switch statement is branched to if none of the case switch expression

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Are psychopaths treatable?

Answered: 1 week ago