logo

Crowdly

Browser

Add to Chrome

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

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){

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{

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 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){

boolean a = true, b = false;

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

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

}

}

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){

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

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

public class Test{

public static void main(String[] args){

int i = 0;

System.out.println(~i);

}

}

View this question

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

public class Test{

public static void main(String[] args) {

int i = 50, j = 10;

int k = i + 10 / j;

System.out.println(k);

}

}

View this question

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

public class Test{

public static void main(String[] args){

int i = 2;

System.out.println(i << 3);

}

}

View this question

public class Test{

public static void main(String[] args){

int i = 10, j = 5;

System.out.println(i & j);

}

}

View this question

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

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

Browser

Add to Chrome