length: It is non static variable belongs to array object. We call ‘length’ variable on array object. It returns the length of array in int format. Read the size of array:
Array Declaration: In the declaration of array, a memory block will be created only for array variable. With the declaration, array is not pointing to any array element. Initializing one dimensional array: int integers; // …
What is array? Using primitive variable, we can store only one value at a time. For example int a = 10; a=20; print(a); To store more than one element of same type, we use arrays. …
Anonymous inner class: Defining the class with no name is called Anonymous inner class. It is also one type of Local inner class. We define anonymous inner class inside method. Constructors are not allowed to …
Local inner classes: Defining a class inside the block or method or constructor. It is working like a local variable in Java application. Access modifiers cannot be applied to the local inner classes. Local inner …
One class cannot access the private members of another class even in Parent-Child relation. Outer class can access the private functionality of inner class. Inner class access private members of outer class as well. Non-static …
Non static inner class: Defining inner class without static keyword. Non static members we access using instance. We can access inner class using outer class instance. We need to instantiate outer class by which we …
Static inner classes: We access static members using class name. Defining a class with static keyword is called Static inner class. We access static inner class using outer class name. Creating object of static inner …
Inner class: Define a class inside another class. Inner class is also called nested class. Inner classes clearly have two benefits one is ‘name control’ and second one is ‘access control’. Defining more than one …
wait, notify and notifyAll(): We can implement inter thread communication using these methods. wait(), notify() and notifyAll() methods are belongs to Object class. We must use these methods with synchronized context of java application. wait() …