logo

Crowdly

Об’єктно-орієнтоване програмування

Looking for Об’єктно-орієнтоване програмування test answers and solutions? Browse our comprehensive collection of verified answers for Об’єктно-орієнтоване програмування at vns.lpnu.ua.

Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!

Яким буде результат виконання коду?

public class Test {

public static void main(String[] args){

int a = 25;

if(a < 25)

System.out.println("1");

if(a > 10)

System.out.println("2");

else

System.out.println("3");

}

}

View this question

Яким буде результат виконання коду?

public class Test {

public static void main(String[] args){

int a = 23, b = 30;

if(a > 20 && b > 25)

System.out.println("1");

if(a > 30 && b < 35)

System.out.println("2");

else

System.out.println("3");

}

}

View this question
Яким буде результат виконання коду?

public class Test{

public static void main(String[] args){

int i = 1;

switch(i){

default:

System.out.println("Default ");

case 1:

System.out.println("1 ");

break;

case 0:

System.out.println("0 ");

}

}

}

View this question

Яким буде результат виконання коду?

public class Test {

public static void main(String[] args){

int a = 2 * 22 + 13 - 21;

int b = 15 * 3 + 17 - 12;

if(a > b);

System.out.println("Greater");

else

System.out.println("Less");

}

}

View this question

Яким буде результат виконання коду?

public class Test{

public static void main(String[] args){

char c = 'd';

switch(c){

case 'a' :

System.out.print("a");

case 'b' :

System.out.print("b");

case 'c' :

System.out.print("c");

case 80 :

System.out.print("80");

default :

System.out.print("No match");

}

}

}

View this question

public class Test {

public static void main(String[] args){

int temperature = 33;

if(temperature < 0)

System.out.println("Freezing");

else if(temperature < 30)

System.out.println("Pleasant");

else if(temperature < 50)

System.out.println("Hot");

else

System.out.println("Boiling");

}

}

View this question

Яким буде результат виконання коду?

public class Test {

    

    public static void main(String[] args){        

        

        String state = "on";

        

        if(state = "on")

            System.out.println("On");

        else

            System.out.println("Off");

        

    }

}

View this question

Яким буде результат виконання коду?

public class Test {

public static void main(String[] args){

boolean a = true, b = false;

if(a && !b) System.out.println("true");

else System.out.println("false");

}

}

View this question

Яким буде результат виконання коду?

public class Test{

private static final int ON = 1;

private static final int OFF = 0;

public static void main(String[] args){

int state = 1;

switch(state){

case ON:

System.out.println("On");

break;

default:

System.out.println("Unknown");

case OFF:

System.out.println("Off");

}

}

}

View this question

Яким буде результат виконання коду?

public class Test {

public static void main(String[] args){

int i = 51;

if(i > 50)

System.out.println("Greater than 50");

else

System.out.println("Less than 50");

System.out.println("Done");

}

}

View this question

Want instant access to all verified answers on vns.lpnu.ua?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!