Implementing an interface
When we would like to implement the interface we should be complete the full application .Its implement by properly and concernedly overriding all of the methods defines by the interface.most important thing is a single class can implement many interface.Reply
return type methods is basically use in the overloaded method but in this case its perfectly use but in the overridden methods are cant do it.
object reference return types ca accept null as a return value.
Its with an object reference return type, can return a subtype.,Reply
Constructors and Instantiation
A constructor is always invoked when the new object is created ts mainly use that time.
interface do not have a construct.Reply
static method implement behavior that are not affected by the state of any instance.here only one value of the static variable.this method is cant access an instance variable directly. Its method also not overridden but they ca be redefined.Reply
Coupling and Cohesion
coupling refers to the degree to which one class knows about or uses members of another class.Reply
stack and heap
stack basically use for the Local variable its a mainly method variable its live on the stackReply
Literals and primitive Casting
Literals basically many types are their but right now we can see that Integer literals can be decimal , its also can be octal for the example 013 or its can be see also in the hexadecimal for the example 0x3dReply
four basic scopes which is following here :
static variables live basically as long as their class lives.
instances variable live as long as their object lives.
local variable live as long as their method is on the stack; however ,if their method invokes another method.they are temporarily unavailable.
block variables live until the block completes.Reply
Using Wrappers in Java
The wrapper classes correlated tot he primitive types.Its have a two main functions :
Its wrap primitives so that they can be handled like objects.
To provide utility methods for primitives.
Wrappers are using most importance families method whch is three are there :
Garbage Collection and Advanced Overloading
IN the programming language JAVA Garbage collection provides automated memory management.
Its primitive wining uses the smallest method argument possible.Its used mainly individually boxing and var-args are compatible with overloading.