100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
UGRD-ITE6201F Computer Programming 2 - Midterm Exam (100% Correct Answers) GRADED A $12.49
Add to cart

Exam (elaborations)

UGRD-ITE6201F Computer Programming 2 - Midterm Exam (100% Correct Answers) GRADED A

 9 views  0 purchase
  • Institution
  • Sti

UGRD-ITE6201F Computer Programming 2 - Midterm Exam (100% Correct Answers) GRADED A

Preview 3 out of 23  pages

  • October 28, 2024
  • 23
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
All documents for this subject (1)
avatar-seller
ProfGoodlucK
UGRD-ITE6104 Computer Programming 2
Midterm Lab Exam



1. What will happen if you use JOptionPane. showInputDialog statement in your
program?
Select one:
a. The program will display message dialog box returns String value.
b. The program will display an input dialog box that allows the user to input text and
returns String value.
c. The program will display message dialog box.
d. The program will display an input dialog box that allows the user to input text and
returns the correct type value.
e. None of these


2. What is the output of the code snippet below:
void main(){
test(1.0);
test(1);}
void test(double x){
System.out.print(x); }
void test(int x){
System.out.print(x);}
Select one:
a. 1.01
b. 1.0
c. 11
d. 1.01.0
e. None of the choices


3. Which is not a decision control structure?
Select one:

,a. if else-if else
b. if
c. switch
d. if else
e. None of these


4. What will happen if you use JOptionPane.showMessageDialog statement in your
program? The program will display message dialog box.


5. Which of the following shows Overloading method?
Select one:
a. void test(int x){} void test(int y){}
b. All of these
c. void test(){} void test(){}
d. void test(int x){} void test(double x){}


6. What will be the value of x after executing this code
for(int x=0; x<=10; x++) {} is run?

Select one:
a. 1
b. 0
c. 11
d. 10
e. None of these


7. Which of the following correctly accesses the sixth element stored in an array of
10 elements?
Select one:
a. intArray[7];
b. stringArray[5];
c. intArray[10];
d. intArray[6];

, e. None of these


8. What is the output of the code snippet below:
void main(){test(“11”);test(“1”);}
void test(String x){System.out.print(x + x);}
Select one:
a. 222
b. None of the choices
c. 111111
111
d. 6


9. Which of the following is a valid nexDouble() return value?
Select one:
a. floating-point literal
b. double value
c. 12.0
d. All of these
e. 3.1416


10. Which of the following is a valid nextByte() return value?
Select one:
a. None of these
b. int value
c. 128
d. short value
e. 3


11. What will be the output if you execute this code?
do{System.out.println("Hello World!");}while(false);


Select one:

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller ProfGoodlucK. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $12.49. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

52928 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$12.49
  • (0)
Add to cart
Added