AP Computer Science 1-8

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

What is casting in Java?

Casting is turning a value of one type into another type.

Which of the below is not a primitive type in Java?

apple

Which of the following is a proper way to declare and initialize a variable in Java?

int myNumber = 10;

Which of these input methods was not introduced in the video?

readChar

What does this Java expression evaluate to?

true

What does this Java expression evaluate to? 80 >= 80

true

Which of the below is an example of a boolean?

true

Which of the below is a logical operator?

!

Which of the below is NOT a Java arithmetic operator?

#

What will this code segment output if the user inputs the number 10? int yourInteger = readInt("Please input a number"); System.out.println(yourInteger);

10

What is the result of this expression? 150 % 100

50

What will this java expression evaluate to? (int) 9.9

9

Which of the following is NOT a comparison operator?

?

What is a boolean in Java?

A true or false value

What will this code segment output? System.out.println("Hello"); System.out.println("World");

Hello World

Which code segment will print "Hello Karel" to the screen in Java?

System.out.println("Hello Karel");


Ensembles d'études connexes

chapter 11 EMT- airway questions

View Set

Fin 334 Test 3 Concepts Chapter 8 and 9

View Set

Psych Concept Practice Chapter 9, 12, 13

View Set

CHAPTER 9 - HUN 1201 - CENGAGE STUDY QUESTIONS

View Set

Unit 11 - Contactors, Relays, and Overloads

View Set