Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

how to call one program .class file in another program

Answer Posted / sudarshan kumar

public class Hello{
int a=5;
void sum(){
int s=a+10;
System.out.print("\n sum :: "+s);
}
}

class Client{
public static void main(String x[]){
Hello h=new Hello()
h.sum();
}
}

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are methods and how are they defined?

1201


Explain the purpose of garbage collection in Java?

1018


What is numeric data type?

977


Why is singleton class used?

1030


What is the map interface in java programming?

1007


How do you use parseint in java?

974


Can we have more than one package statement in source file ?

1013


Explain about serializable interface in java?

989


Explain try and catch keywords in java?

1194


What is string data type?

960


What are data types in oop?

1024


Is a case study a method or methodology?

888


Explain the difference between throw and throws in java?

989


Can a constructor be made final?

1103


What is java literals?

1119