View Single Post
  #1 (permalink)  
Old 04-22-2008, 11:25 AM
jazz2k8's Avatar
jazz2k8 jazz2k8 is offline
Senior Member
 
Join Date: Apr 2008
Posts: 113
jazz2k8 is on a distinguished road
How to Merge all classes into One class
I am having total 3 classes and i want to merge all into one class.
EG:A,B,C are different type of documents
class A
Class B
Class C

Now i want all of them into one single class
I have taken
Class D{
public void A()
{System.out.println("A");
}
public void B()
{System.out.println("B");
}
public void C()
{System.out.println("C");
}
}
class MainClass()
{public static void main(string args[]){
MainClass m=new MainClass();

string doctype="A,B,C";
System.out.println("Eneryour Doctype:" +doctype);

if (doctype="A"){
m.A();
}
if (doctype="B"){
m.B();}
if (doctype="C"){
m.C();
}
}

Am i correct???if not i need your suggestions ...
thanks in advance...

-jazz
Reply With Quote
Sponsored Links