Review Questions

   

Java™ 2 Primer Plus
By Steven Haines, Steve Potts

Table of Contents
Chapter 2.  Keywords, Data Types, and Variables


1:

Which of the following is not a keyword in Java?

  1. int

  2. label

  3. continue

  4. byte

2:

What is the difference between syntax and semantics?

3:

How do computers represent data?

4:

What are data types? What do they do?

5:

What is the difference between a short and an int?

6:

Are the following statements legal? Why or why not?

 short s1 = 10;  short s2 = 10;  short result = s1 + s2; 

7:

What is arithmetic promotion?

8:

What types can you assign a short to without explicit casting?

9:

What is casting and how do you do it?

10:

How do you designate a variable to be a constant?


       
    Top
     



    Java 2 Primer Plus
    Java 2 Primer Plus
    ISBN: 0672324156
    EAN: 2147483647
    Year: 2001
    Pages: 332

    Similar book on Amazon

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net