Java Programming Quiz 2-6

Java Programming Quiz 2-6

University

50 Qs

quiz-placeholder

Similar activities

Нуреке 1.3

Нуреке 1.3

University

50 Qs

ULANGAN HARIAN 3 -  SISTEM KOMPUTER

ULANGAN HARIAN 3 - SISTEM KOMPUTER

10th Grade - University

50 Qs

Midterm Exam for AST 122

Midterm Exam for AST 122

University

50 Qs

CCNA 2 Module 1-4

CCNA 2 Module 1-4

University

51 Qs

COMBINATIONAL  DIGITAL CIRCUITS

COMBINATIONAL DIGITAL CIRCUITS

University

55 Qs

LATIHAN UNBK TKJ 2020

LATIHAN UNBK TKJ 2020

University

50 Qs

LATIHAN SOAL

LATIHAN SOAL

10th Grade - University

50 Qs

Final Exam - Introduction to Computing

Final Exam - Introduction to Computing

University

52 Qs

Java Programming Quiz 2-6

Java Programming Quiz 2-6

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

Fernando Nunez

Used 3+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

50 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following formats the output to three digits after the decimal point?


System.out.printf("%.3f", 10.0 / 3.0);


System.out.println(%.3f, 10.0 / 3.0);


System.out.printf(%3f, 10.0 / 3.0);


System.out.printf(.3, 10.0 / 3.0);


2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If x= 14 and y= 3, what will the output of the following code be?


int output= x%y;

System.out.println("Output: " +output);

2

4

4.6667

46.67

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements best reads in a user input of 5 if the value is to be treated as an integer?


int userNum = scnr.nextInt();


int userNum = scnr.nextInteger();


double userNum = scnr.next();


int userNum = scnr.nextLine();


4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which is the correct way to read in the user's name using the Scanner class?


String name = scnr.next();


String name = scnr.nextString();


String name = scnr.NextString();


Char name = scnr.nextChar();


5.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

The following line of code is a valid expression. (assume that w, x, y, and z are all variables that have been declared as integers)


result = (wx) + 2y + z - 5;


True

False

True

False

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following values could be stored as boolean?


true/false

f

3

no

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

2.25

10.0


3.3

3.0

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?

Discover more resources for Computers