The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 2 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
Question 20
Given this code fragment
int x = 5, y = 6, z = 7
foo(x, y, z)
System.out.println(x + "", "" + y + "", "" + z)
public void foo(int a, int b, int c)
a = a + 3
b = a + c
c = c + b
What is the output?
A. 5, 6, 7
B. 8, 12, 13
C. 2, 0, 4
D. 8, 15, 22
Â
Â
Question 21
javadoc comments begin and end with
A. // and //
B. /* and */
C. /** and */
D. /@ and @/
Question 22
When using the BlueJ debugger, a class must be compiled before you can set a break point in it?
True
False
Â
Question 23
Which of the following are Java naming conventions?
#1: Classes start with an uppercase letter
#2: Methods start with an uppercase letter
#3: Object start with a lowercase letter
#4: Objects start with an uppercase letter
#5: Classes start with a lowercase letter
#6: Methods start with a lowercase letter
A. #1, #3 and #6
B. #4, #5 and #6
C. #1, #2 and #4
D. #3, #5 and #6
Â
Â
Question 24
Given the array
double cost[] = new double[5]
How would you access the last element of the array?
A. cost.get(4)
B. cost[4]
C. cost.get[5]
D. cost[5]
Â
Â
Question 25
In a program, you create an object of a class using the keyword ____.
A. abstract
B. extends
C. create
D. new
-----------