AmbitionBox

Discover Best Places to work in India

Java Programming

Java Programming Questions and Answers

Showing 11 - 13 of 13 questions

11

Which of the following statements are valid array declaration? (A) int number(); (B) float average[]; (C) double[] marks; (D) counter int[];

a

A

b

A & C

c

D

d

B & C

correct answer d
12

Which of the following will output a random with values only from 1 to 10?

a

System.out.println(Math.round(Math.random()* 10));

b

System.out.println(Math.round(Math.random() % 10));

c

System.out.println(Math.random() *10);

d

None of these

correct answer b
13

Which of the following will compile correctly?

a

System.out.println(Math.max(x));

b

System.out.println(Math.random(10,3));

c

System.out.println(Math.round(20));

d

System.out.println(Math.sqrt(10));

correct answer b
Select a company to compare with

vs

Similar Companies