Wednesday, December 31, 2014

package lesson1;/*Final keyword has a numerous way to use:A final class cannot be subclassed.A final method cannot be overridden by subclassesA final variable can only be initialized once*/publicclassHello{publicfinalint number ;
Hello (){
number =10;}}

Sunday, December 21, 2014

package lesson1;publicclassMyClass{/* == is equal to != is not equal to > is greater than < is less than >= is greater than or equal to <= is less than or equal to */publicstaticvoidmain(String[] args){int x =10;if(x <=20){
System.out.println("yes x == 10");}else{
System.out.println("no x != 10");}}}