


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



The main( ) Method - This gets your Java program running. There must be at least one such method among your classes. if/else - public static void main(String [ ] args){ int= if(age<=17){ System.out.println("You are too young") } else { System.out.println("You are old"); } Method - Houses the program statements that perform its tasks. instantiation - Process of building an object of a class before a program can perform the tasks that the class' methods define. Method call - A command to execute another method, which causes all of the statements inside that method to be executed. Instance variables - A variable defined in a class for which each instantiated object of the class has a separate copy. Similar, but not equal to, a class variable. Inheritance - lets once class get all definitions from another for free
void - Used to indicate that a method does not return a value, and instead represents a command static - Used to indicate that a method can be accessed without an object method syntax - modifier returnValueType methodName (parameters){ body= statements } void method - A method with void in place of the return type, which does not return a value when called Main Method Syntax - Public static void main(String[] args) { // code } local variable - a variable that is declared within a method, must be given a value before it's used and can't be used outside that method(=block of code) e.g. a parameter (can't be declared twice) Boolean data type - a variable that is either true or false Constructor syntax - access specifier(PUBLIC) name of class (list of parameters including data type) { constructor body; } immutable object - An object whose value cannot be changed.
String - Sequence of characters double - A real number(64 bytes) float - A real number(32 bytes) toUpperCase - This method converts a character to uppercase. toLowerCase - This method converts a character to lowercase. Algorithm - A set of steps that define a process for solving a specific problem.