Thursday 11 April 2013

Update Environment Variables 2: Implementation & Blog Task



1.    What is the value of X & Y if

  • a.    R = 400, T = 10           X = 1400         Y = 910
  • b.    R = 4000, T = 20         X = 5000         Y = 920
  • c.    R = 4010, T = 50         X = 0               Y = 0


2.    How many packages may a Java project contain?
There is no concrete limit to how many packages are allowed per project.  


3.    How many classes may a Java package contain?

There is no concrete limit to how many classes are allowed per project.


4.    What are the two types of methods?

Procedure & Function


5.    Explain the differences and similarities between the two types of methods.

Both of the methods execute code, but the Function method will return a value where the Procedure method will not


6.    Of the two types of methods, which one is the Main method?

Procedure


7.    What does the keyword void mean & where is it generally seen?

The keyword Void is contained within the main method Procedure, and it identifies that the procedure does not return a value


8.    What is the special purpose of the Main method?

The main method is where the program execution begins


9.    Explain the purpose of a method parameter?

A parameter is the input value to a method


10.  How is the semi-colon used in the Java syntax?

A semi-colon is used to terminate a statement line


11.  How are the curly braces used in the Java syntax?

Curly brackets, { }, are used to begin and end blocks


12.  What data type stores whole numbers?

Integer      int


13.  What data type stores a collection of keyboard characters?

String       string


14.  What data type stores a single character?

Character     char


15.  What data type stores a True/False value?

Boolean


16.  What is a variable used for?

A variable is used to store a non fixed value in memory 


17.  What is the syntax for a literal string?

string exampleString = “I do love chocolate”;


18.  What is the syntax for a literal character?

char exampleChar =”A”;


19.  What is the syntax for a literal whole number?

int exampleInt = “7”;


20.  What is the increment operator?

+=


21.  What is the decrement operator?

-=


22.  What is the concatenation operator?

+


23.  What keyword is used between each case in a Switch, to stop execution of the Switch?

break


24.  What should always be the last case of a Switch?

else


25.  How is an object defined?

A class is a definition of all state and behaviours belonging to a group or item

Eg     Cake is the Class,    Chocolate, Lemon, Banana, Carrot are all objects of the class

Original Post Apr 25th 2012

No comments:

Post a Comment