AP Computer Science 1-8

Pataasin ang iyong marka sa homework at exams ngayon gamit ang 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;

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 is the result of this expression? 150 % 100

50

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");

Which of the following is NOT a comparison 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 will this java expression evaluate to? (int) 9.9

9

What is a boolean in Java?

A true or false value

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

readChar


Kaugnay na mga set ng pag-aaral

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