I am new programmer of java. I believe someone can help me out with following problem
[CODE=cpp]class Employee
{
string name1;
Employee()
{
Name="Amitabh";
}
Employee(String s)
{
Name=s;
}
public static void main(String[] args)
{
???
}
}[/CODE]
if I am running the above application as:
java Employee Mayuri
Then is it possible to initialize Mayuri(i.e. args[0]) as an object of class Employee?
I mean to say Is it possible to provide objectname as command line argument?
[CODE=cpp]class Employee
{
string name1;
Employee()
{
Name="Amitabh";
}
Employee(String s)
{
Name=s;
}
public static void main(String[] args)
{
???
}
}[/CODE]
if I am running the above application as:
java Employee Mayuri
Then is it possible to initialize Mayuri(i.e. args[0]) as an object of class Employee?
I mean to say Is it possible to provide objectname as command line argument?
Comment