You are on page 1of 3

1.

b extends a then b can access a's methods using this

2.interface is by default abstract.

3.methods public abstract .methods of interface cannot be static final strictfp native

4.you can have constants in an interface but be public static final

5.identifiers : currency,connecting ,letter not number,after that any combi of currency letter
connecting number

6.class names must be camelcase eg Dog,PrintWriter and nouns,interfaces shud be adjective

7.method : first small then camelcase,verb noun pair

8.variables : small camelcase,meaningful

9.constants : uppercase with separators

10.this refers to the currently executing object,the object running the code where you see the this
reference

11.protected members can be access only through inheritance

12.Any other neoghbour class other than the one that subclassed the class with prtotected
members cannot create an instance of sublass and access protected method,its become like
private to that subclass.

13.though subclasses of the subclass can see protected members.

14.access modifiers can't be applied to local variables,lv's can be only marked final.

15.you can have an abstarct class with no abstract methods at all

16. not allowed : abstract with any of these static final private

17.synchronised keyword can be applied only to methods

18.diff between arguments and parameters : callmethod(2,"alok");---arguments ,definemethod(int


a,String b)---parameters

19.var args : only one in a method and that too last doStuff(String a,int... x)

20.Constructors : don't have return type not even void,can't be static abstract final

21.variables : primitives and reference,primitives are of 8 types

22.all number types are made up of 8 bit bytes leftmost is for sign

23.booleans are either true or false,bit representation is VM dependent.

24.char type contains a single 16 bit unicode character

25.instance variables cannot be marked static

26.lv must be initialized before its used

27.can't specify size of array

28.final ref varible can't be reassignes though its state can be changed i.e the object's variables
can be changed.

29.enums hel you have predefined values.

30.enums can be declared public or default

31.can be declared inside a class or outside and that determines their access syntax

32.cannot declare enums in methods

33.you never invoke an enum constructor directly

You might also like