Академический Документы
Профессиональный Документы
Культура Документы
e.g
package p4;
class Test{
System.out.println(“Hello”);
}
Javap –d . Test.java
p4
Test.clas
s
java p4.Test
Access Modifier:
Most-accessible------------------------------lease accessible
public > protected > default >private
Inner class and Outer class:
class A{
class B{
Outer class – A
After compilation of nested class we get two class files having name as
below
E:\Priyansh_Java_Prog>javac nestedClassEx01.java
Method:
- it is like function present in c and cpp.
Method prototype
Method signature
Method call
Def: block of code with name and having parameter as input and it
will return something or not is called as method.
e.g.
int c;
c=a+b;
System.out.println(“Addition is :”+c);
abstract keyword: