0% found this document useful (0 votes)
49 views4 pages

APCS Java Output - Quizizz

This document contains a Java quiz with 7 multiple choice questions testing output from Java code snippets. It provides the code snippets, multiple choice options for each question, and the answer keys. The document also includes information about the quiz such as the name, class, date, and instructor.

Uploaded by

roboticslab11
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views4 pages

APCS Java Output - Quizizz

This document contains a Java quiz with 7 multiple choice questions testing output from Java code snippets. It provides the code snippets, multiple choice options for each question, and the answer keys. The document also includes information about the quiz such as the name, class, date, and instructor.

Uploaded by

roboticslab11
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

2/15/24, 5:19 AM APCS Java Output | Quizizz

Worksheets Name

APCS Java Output


Class
Total questions: 7
Worksheet time: 4mins
Date
Instructor name:

1. package Quiz;
public class quiz {
public static void main(String[] args)
{int x=5;
System.out.println("x= "+ x); } }
the output= ?

a) X=X b) X=5

c) 5 d) X

2. package Quiz;
public class quiz {
public static void main(String[] args)
{ int x=5; int y;
y=x;
System.out.println(x+" "+y);}}

a) 5 5 b) x y

c) 55 d) x+""+y

3. package Quiz;
public class quiz {
public static void main(String[] args) {
String a="asma";
String b="ali";
String c=a+b; System.out.println(c);}}

a) ali b) c

c) asma d) asmaali

https://quizizz.com/print/quiz/5bb218c9307b9d001aa60d17 1/4
2/15/24, 5:19 AM APCS Java Output | Quizizz

4. package Quiz;
public class quiz {
public static void main(String[] args) {
String b="ali";
String c=b.substring(0,2); System.out.println(c);}}

a) li b) a

c) al d) ali

5. package Quiz;public class quiz { public static void main(String[] args) {


String a="asma";
int c=a.length(); System.out.println(c);}}

a) 3 b) 2

c) 5 d) 4

6. package Quiz;public class quiz { public static void main(String[] args) {


String a="asma";
int c=a.length(); System.out.println(c);}}

a) 2 b) 4

c) 3 d) 5

7. package Quiz;public class quiz { public static void main(String[] args) { String a="asma"; int
c=a.indexOf("s"); System.out.println(c);}}

a) 3 b) 1

c) 0 d) 2

https://quizizz.com/print/quiz/5bb218c9307b9d001aa60d17 2/4
2/15/24, 5:19 AM APCS Java Output | Quizizz

Answer Keys

1. b) X=5 2. a) 5 5 3. d) asmaali

4. c) al 5. d) 4 6. b) 4

7. b) 1

https://quizizz.com/print/quiz/5bb218c9307b9d001aa60d17 3/4
2/15/24, 5:19 AM APCS Java Output | Quizizz

https://quizizz.com/print/quiz/5bb218c9307b9d001aa60d17 4/4

You might also like