Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. In Java the statement used to tell the compiler that the current source file is using classes from a specified package is ______________. a.

1. In Java the statement used to tell the compiler that the current source file is using classes from a specified package is ______________.

a. include b. access c. library d. import e. none of the above

2. Comments containing more than one line are most efficiently coded in Java:

a. between double quotes b. after // c. between /* and /* d. between \* and *\ e. none of the above

3. To assign the value in age to the variable max_age in Java use ____________.

a. max_age = age; b. max_age equals age; c. max_age == age; d. age = max _age; e. none of the above

4. What data type does the Java readLine() method input?

a. String b. decimal c. integer d. character e. none of the above

5. In Java the following will output the decimal value of the variable pay with the label Pay is :

a. System.out.println("pay" + Pay is :); b. System.out.Output("Pay is :" + pay); c. System.out.println("Pay is :" + pay); d. System.out print[label("Pay is :") + pay]; e. none of the above

6. Which of the following conditions would have a true value when age and 33 are equal in Java?

a. (age equals 33) b. (age == 33) c. (age != 33) d. (age = 33) e. none of the above

7. Which of the following conditions would have a true value when age and 33 are unequal in Java?

a. (age equals 33) b. (age == 33) c. (age != 33) d. (age = 33) e. none of the above

8. In Java, a method is ______________.

a. an operator b. a module c. always main() d. an invocation e. none of the above

9. Given that k = 0 initially, what is the value of k after execution of the java instruction

while(k <= 5)

{

k = k + 1;

}

a. 0 b. 1 c. 5 d. 6 e. none of the above

10. Given that k = 0 initially, what is the value of k after execution of the java instruction

if(k <= 5)

{

k = k + 1;

}

a. 0 b. 1 c. 5 d. 6 e. none of the above

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

Database Development For Dummies

Authors: Allen G. Taylor

1st Edition

978-0764507526

More Books

Students also viewed these Databases questions