Create Software Components 

Using Java Level 2

 

 

Course Info

Scheme

Resources

Tutorials

Java Demos

Utilities

Links


 

    Quiz 4 - Answers

Data Types, Variables & Constants

 

Question 1.   

(b) int

Question 2.         

(d) String

Question 3.         

(d) _num

Variable names can start with a letter, underscore or $.  You cam also include numbers in the name but not at the beginning.

Question 4.   

int

byte

char

long

string

float

double

boolean

Question 5.         

(a) True

Question 6.         

(c) float

Question 7.         

(a) True

Question 8.    

(a) 'a'

Question 9.         

(b) "a" 

Question 10.   

(a) True

Question 11.   

final

Question 12.   

(c) the variables myData and MYdata are treated as the same variable by Java.  (definately false)

Question 13.   

(a) car is the name of a class.

Question 14.   

(a) public String myMethod(int n);

Question 15.   

(c) 7 Bluebirds

Each method had it's own separate copy of the variables a and s.  The values of a and s were passed to the birdWatch method.

 

        

 

  Site Home 

Java Home   

  Forum  

Course Info

Welcome

Overview

Assessment

Qualification

Scheme of Work

Assignments

Resources

Information

Blackboard

Learning Center

Web Materials

Reading

Java Demos

Utilities

Links

Lecture Materials

Tutorials & Notes

Exercises

Activities

Quizzes

 

Site Home

Top

Unit Home

ADR 2002