1.Input - Output data types.
input data:
import java.util.Scanner;
Scanner scan = new Scanner( System.in );
Random random =new Random();
double radius = scan.nextDouble();
radius =
random .nextDouble();
output data:
System.out.print...;
2.Arrays and ArrayList
Arrays :
declaring and creating arrays
int[] c =new int[12 ];
String[] b = new String[100];// create array b
int[] c;// declare the array variable
c=new int[ 12];// create the array; assign to array variable
Using an Array Initializer
int[] n = {10, 20,30,40,50 };
types :
length of array : array.length()
try{
} // end try - out of range
catch( ArrayIndexOutOfBoundsException e ){/
} // end catch
for (parameter :arrayName )
statement
ArrayList :
ArrayList< String > list;
ArrayList< String > items = new ArrayList< String >();
3 . variable :
final int number = 10 ; // this declare const
4 Class and objects.
Java supports onlysingle inheritance :extends+superand a dot (.) separator+protected. +@Override
Polymorphism
5 .Throwing exceptions
type fuction( data type .){
if(condition){
}
else{
throw new IllegalArgumentException( "...." );
}
}
try{
type fuction( data type .)
}
catch ( IllegalArgumentException e ){
System.out.printf(e.getMessage() );
} // end catch
http://www.tutorialspoint.com/log4j/index.htm
checkstyle-5.1
http://www.uml-diagrams.org/use-case-diagrams.html
code refactoring
http://www.refactoring.com/catalog/index.html
Debugging &
Tracing the Application
page : 350
No comments:
Post a Comment