Homework Answers

Math 58880 52480
Physics 50710 47629
Chemistry 44357 42759
Programming & Computer Science 34330 30918
Economics 34267 33209
English 12729 11462
Biology 9425 8734
Management 8270 7078
Engineering 8082 6895
History 4259 3853
Psychology 2611 2287
Geography 2457 1903
Sociology 2387 2125
Law 2080 1463
Other 2007 1890
Marketing 1915 1605
Philosophy 1405 1148
Political Science 1107 1010
French 565 528

Questions: 281 843

Answers by our Experts: 258 976

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

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?

  1.     class Output {
  2.         public static void main(String args[])
  3.         {   
  4.              int a = 1;
  5.              int b = 2;
  6.              int c;
  7.              int d;
  8.              c = ++b;
  9.              d = a++;
  10.        c++;
  11.        b++;
  12.        ++a;
  13.        System.out.println(a + " " + b + " " + c);
  14.      }  

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?

  1.     class jump_statments {
  2.         public static void main(String args[])
  3.         {       
  4.              int x = 2;
  5.              int y = 0;
  6.              for ( ; y < 10; ++y) {
  7.                  if (y % x == 0)
  8.                      continue
  9.                  else if (y == 8)
  10.               break;
  11.            else
  12.             System.out.print(y + " ");
  13.          }
  14.       }
  15.     }

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?

  1.     class Output {
  2.         public static void main(String args[])
  3.         {   
  4.              int x, y = 1;
  5.              x = 10;
  6.              if (x != 10 && x / 0 == 0)
  7.                  System.out.println(y);
  8.              else
  9.                  System.out.println(++y);
  10.       }
  11.     }

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


LATEST TUTORIALS
APPROVED BY CLIENTS