OOP evaluation

OOP evaluation

University

13 Qs

quiz-placeholder

Similar activities

Array_to be discussF3

Array_to be discussF3

University

18 Qs

OOP Quiz

OOP Quiz

University

10 Qs

II CSM A & B

II CSM A & B

University

15 Qs

JAVA UNIT 1 PART 2

JAVA UNIT 1 PART 2

University

15 Qs

Java Programming Quiz

Java Programming Quiz

University

18 Qs

Java Programming Basics

Java Programming Basics

University

12 Qs

Java Arrays

Java Arrays

University

10 Qs

JAVA FINAL QUIZ FOR ASSESSMENT

JAVA FINAL QUIZ FOR ASSESSMENT

University

15 Qs

OOP evaluation

OOP evaluation

Assessment

Quiz

Computers

University

Hard

Created by

pubudu s

Used 3+ times

FREE Resource

13 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

public class Example {

public static void main(String[] args) {

String str1 = "hello";

String str2 = "world";

String result = str1 +" "+ str2;

System.out.println(result);

}

}

helloworld

hello world

worldhello

Compilation Error

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What would the new value of A be?

A=5;

System.out.println(A++);

6

3

5

4

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

what's the output of below code?

public static void main(String []args){

int z =50;

System.out.println(x);

m();

}

public static void m(){

int z =55;

System.out.println(x);

}}

55,50

55,55

50,55

50,50

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the following code output?

int x = 1;

System.out.println(++x);

1

2

compilation error

runtime error

5.

MULTIPLE SELECT QUESTION

30 sec • 2 pts

Which statement(s) are equivalent to i = i + 1?

i += 1

i--

i -= 1

i++

6.

MULTIPLE CHOICE QUESTION

45 sec • 2 pts

If a=10, b=5, c=12

Find result for : 8 * (a + b + c) – a % c

78

206

77

216

7.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

public class A{

int h =10;

static int p=20;

public static void main(String args[]){

int x =5;

System.out.println(x);

System.out.println(p);

System.out.println(h);

}

}

5,20,Erorr

Error

Error,5,20

5,20,10

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?