Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSII Final Review. How many bits are in a byte? 8.

Similar presentations


Presentation on theme: "CSII Final Review. How many bits are in a byte? 8."— Presentation transcript:

1 CSII Final Review

2 How many bits are in a byte?

3 8

4 Programming languages evolved in three stages: high level, assembly, and machine languages. Which was created first?

5 Programming languages evolved in three stages: high level, assembly, and machine languages. Which was created first? Machine Languages

6 When compared byte for byte, which is more expensive, RAM or typical hard drive space?

7 When comparted byte for byte, which is more expensive, RAM or typical hard drive space? RAM

8 Name a type of system software.

9 Windows 8

10 Convert the binary number 10001 to hexadecimal.

11 17

12 True or False Java and C++ are object oriented languages.

13 True

14 Provide an example of an extended assignment operator.

15 +=, -=, *=, /=, %=

16 Provide an example of a relational operator.

17 , =, !=, ==

18 Which logical operator has the highest precedence?

19 !

20 The statement below creates a random number in what range? (int)(Math.random() * 7 + 1)

21 The statement below creates a random number in what range? (int)(Math.random() * 7 + 1) [0, 1) [0, 7) [1, 8)

22 What is the value of var? int var = (7 – 3 % 4 * 5);

23 What is the value of var? int var = (7 – 3 % 4 * 5); -8

24 When two reference variables refer to the same object, this is known as…

25 aliasing

26 TRUE/FALSE Static variables should be named with all capital letters.

27 TRUE/FALSE Static variables should be named with all capital letters. False – final variables are named with all capital letters

28 What is the difference between a concrete and abstract class?

29 An abstract class cannot be instantiated.

30 What will be the ending value of var? int var = 7; if( var < 10) var = 12; if(var < 20) var = 25; if(var < 30) var = 7;

31 What will be the ending value of var? int var = 7; if( var < 10) var = 12; if(var < 20) var = 25; if(var < 30) var = 7; //7

32 What will the code below print? System.out.println(5/2*3.0 + 1.3);

33 What will the code below print? System.out.println(5/2*3.0 + 1.3); 7.3

34 In the method below, the variable temp has what type of scope? public void mystery(){ for(int i = 0; i < 10; i ++){ int temp = 15; System.out.print(temp / i ); }

35 In the method below, the variable temp has what type of scope? public void mystery(){ for(int i = 0; i < 10; i ++){ int temp = 15; // Block Scope System.out.print(temp / i ); }

36 What is the value of var? int[][] arry = new int[5][10]; int var = arry.length + 7;

37 What is the value of var? int[][] arry = new int[5][10]; int var = arry.length + 7; // 5 + 7 = 12

38 Let X be an interface and Y be an abstract class. Z is a concrete subclass of Y that implements the X interface. List all possible instantiations involving X, Y, and Z. ** Assume that a no-argument constructor for Z exists.

39 Let X be an interface and Y be an abstract class. Z is a concrete subclass of Y that implements the X interface. List all possible instantiations involving X, Y, and Z. X x = new Z(); Y y = new Z(); Z z = new Z();


Download ppt "CSII Final Review. How many bits are in a byte? 8."

Similar presentations


Ads by Google