logo

Crowdly

Browser

Додати до Chrome

*Програмування на Jаvа

Шукаєте відповіді та рішення тестів для *Програмування на Jаvа? Перегляньте нашу велику колекцію перевірених відповідей для *Програмування на Jаvа в dl.nure.ua.

Отримайте миттєвий доступ до точних відповідей та детальних пояснень для питань вашого курсу. Наша платформа, створена спільнотою, допомагає студентам досягати успіху!

What is the output of the following application?

1: public class CompareValues {

2: public static void main(String[] args) {

3: int x = 0;

4: while(x++ < 10) {}

5: String message = x > 10 ? "Greater than" : false;

6: System.out.println(message+","+x);

7: }

8: }

0%
100%
0%
0%
0%
0%
Переглянути це питання

What is the output of the following code snippet?

3: boolean x = true, z = true;

4: int y = 20;

5: x = (y != 10) ^ (z=false);

6: System.out.println(x+", "+y+", "+z);

100%
0%
0%
0%
0%
Переглянути це питання

What is the output of the following code snippet?

3: int count = 0;

4: ROW_LOOP: for(int row = 1; row <=3; row++)

5: for(int col = 1; col <=2 ; col++) {

6: if(row * col % 2 == 0) continue ROW_LOOP;

7: count++;

8: }

9: System.out.println(count);

0%
0%
0%
100%
0%
0%
Переглянути це питання

How many times will the following code print "Hello World"?

3: for(int i=0; i<10 ; ) {

4: i = i++;

5: System.out.println("Hello World");

6: }

0%
0%
0%
100%
0%
0%
Переглянути це питання

What is the result of the following?

int[] random = { 6, -4, 12, 0, -10 };

int x = 12;

int y = Arrays.binarySearch(random, x);

System.out.println(y);

0%
0%
0%
0%
100%
0%
Переглянути це питання

Which of the following legally fill in the blank so you can run the main() method from the command line? (Choose all that apply)

public static void main( )

100%
100%
0%
100%
0%
100%
0%
Переглянути це питання

Which of the following are true? (Choose all that apply)

4: short numPets = 5;

5: int numGrains = 5.6;

6: String name = "Scruffy";

7: numPets.length();

8: numGrains.length();

9: name.length();

100%
0%
0%
0%
0%
100%
100%
Переглянути це питання

What is the output of the following code snippet?

3: do {

4: int y = 1;

5: System.out.print(y++ + " ");

6: } while(y <= 10);

0%
100%
0%
0%
0%
Переглянути це питання

What is the output of the following code snippet?

3: int x1 = 50, x2 = 75;

4: boolean b = x1 >= x2;

5: if(b = true) System.out.println("Success");

6: else System.out.println("Failure");

0%
0%
100%
0%
Переглянути це питання

What is the output of the following code snippet?

3: boolean keepGoing = true;

4: int result = 15, i = 10;

5: do {

6: i--;

7: if(i==8) keepGoing = false;

8: result -= 2;

9: } while(keepGoing);

10: System.out.println(result);

0%
0%
100%
0%
0%
0%
Переглянути це питання

Хочете миттєвий доступ до всіх перевірених відповідей на dl.nure.ua?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!

Browser

Додати до Chrome