Which of the following is not keyword in java ?
Select one:
a. import
b. package
c. volatile
d. null
What is the output of this program?
Select one:
a. 2 3 4
b. 3 2 4
c. 3 4 4
d. 3 2 3
What is the output of the following program
class TestApp {
public static void main(String[] args) {
for (int index = 0; 1; index++) {
System.out.println("Welcome");
break;
}
}
}
Select one:
A. Welcome
B. Type mismatch error
C. Run infinite-times
D. Welcome Welcome
From the given information (Amount in Lakhs):
cost of goods sold- 580
opening stock- 40
closing stock- 70
creditors at the beginning of the year -60
creditors at the end of the year- 100
cash purchases- 45
Original cost of equipment sold -400
Gain on the equipment sold -50
Accumulated depreciation on the equipment -80
Calculate:
a. Total purchases, credit purchases and payment to creditors (5 Marks)
b. Define the term Net book value, Accumulated depreciation calculate the net book value and cash proceeds from sale of investment
What is the output of this program?
Select one:
a. 1 3 5 7 9
b. 1 3 5 7
c. 1 2 3 4 5 6 7 8 9
d. 2 4 6 8
Create an Address class, which contains street#, house#, city and code (all of type char*).
Create another class Person that contains an address of type Address. Give appropriate get
and set functions for both classes. Test class person in main.
Create a counter class, overload ++ operator for counter post and pre increment, use the
object of counter class as a loop counter for printing a table in main function.
which of the following is the reference data type ?
Select one:
a. array
b. int
c. short
d. double
What is the output of this program?
Select one:
a. 1
b. Runtime error owing to division by zero in if condition.
c. 2
d. Unpredictable behaviour of program.
What is the result of the following Java coding snippet?
class TestApp {
public static void main() {
int odd = 1;
if (odd) {
System.out.println("odd");
} else {
System.out.println("even");
}
}
}
Select one:
A. odd
B. Type mismatch error
C. Run-time exception
D. even