Java

Java - Abstract Class and Abstract Method

Java - Abstract Class and Abstract Method
// abstract class and abstract method demonstration 

abstract class one 
{ 
abstract void show1(); 

void show2() 
{ 
System.out.println("\nWelcome"); 
} 
} 

class two extends one 
{ 
void show1() 
{ 
System.out.println("\nHave a Nice Day"); 
} 
} 

class ssvAbstract1 
{ 
public static void main(String arg[]) 
{ 
two t = new two(); 
t.show1(); 
t.show2(); 
} 
}
Senthilvelan Sambamoorthy

Senthilvelan Sambamoorthy is working as a Professor in Department of Master of Computer Applications, Paavai Engineering College, Namakkal, Tamilnadu, India, He is Masters in Computers Applications. Having 18+ years of experience and his area of interest is Java, JSP, Servlet, J2EE, C#, PHP, Python ASP.NET, SQL Server and etc.