Saturday, October 27, 2018

abstract and final

As an abstract method has no implementation, and a final method has the 'final' implementation, a method cannot be marked both abstract and final.

Get Superclass


getSuperclass()

Class c = p.getClass();
while((c = objectReference.getSuperclass())!=null){
    System.out.println(c.getSimpleName());
}




Sunday, May 18, 2014

GitBash

.gitignore


git touch .gitignore

vi .gitignore

i (for insert)

type text

escape

:q to quit vi
:wq to save and quit vi

cat .gitignore to read .gitignore

other


.git add <name>
.git add -A (adds all in dir)

Thursday, April 3, 2014

Anonymous Classes

"Anonymous Classes (The Java™ Tutorials > Learning the Java Language > Classes and Objects)" ( http://bit.ly/1hiO0OV )