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...

Is it possible to write JAVA program without including any
of the packages,such as "import java.io.*";
bcoz I instantly wrote a code without "import..." statement
and runned the program on command Line & it worked.
the code is:
class Person
{
String name;
int age;
Person(String s,int a)
{
name = s;
age = a;
}
accept()
{
System.out.println(name+"Hi!!!!!");
System.out.println(age);
}
}
class Demo
{
public static void main(Strings args[])throws
IOException
{
String name = args[0];
int age = Integer.parseInt(args[1]);
Person p = new Person(name,age);
p.accept();
}
}

Answer Posted / shaik baji

HI Vijay Kumar Khadia,

I have tried with your above posted code but it
doesn't work so kindly can you explain me more detailed.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you remove an object from an arraylist in java?

982


What is the multi-catch block in java?

1051


What are the special characters?

974


What is the use of jtable?

1128


What about anonymous inner classes in java?

1044


What are the drawbacks of singleton class?

1013


What is the purpose of finalization in java programming?

1033


What does provide mean construction?

1110


Can a class be a super class and a sub-class at the same time? Give example.

1575


What is java util concurrentmodificationexception?

922


What do you understand by access specifiers in Java?

1018


What will be the output of round(3.7) and ceil(3.7)?

1121


What are green threads in java?

1009


Can we use catch statement for checked exceptions when there is no chance of raising exception in our code?

1042


How will you get the platform dependent values like line separator, path separator, etc., ?

1031