• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

i want to have a full address typed even when i press the space bar

 
Vishal Hegde
Ranch Hand
Posts: 1077
Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
class ExecuteAddressBook
{
public static void main(String args[])
{
try
{
AddressBook a=new AddressBook(new

Address(args[0],args[1],args[2]),new SocialSecurity(),new

CurrentStatus(),new Qualification());


{


String displayaddress=a.a.Address();
System.out.println(displayaddress);
}

{

}
}
catch(Exception e)
{
System.out.println("Compiler is very upset with you with not

providing full address details..");
}

}
}


i want args[0] have shanti niketan near juhu talav pani but as soon as i write shanti and press space bar "niketan" is enterd in ars[2] anyone who can help me how to handle this
 
Rob Spoor
Sheriff
Pie
Posts: 20512
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) use code tags
2) On your command line, use quotes around the argument:The operating system will now treat it as one single argument that does not have any quotes around it.
 
Vishal Hegde
Ranch Hand
Posts: 1077
Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks rob prime how stupid of me
 
Rob Spoor
Sheriff
Pie
Posts: 20512
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wouldn't call it stupid; more just not knowing all of the ins and outs of your shell (cmd.exe, bash, ksh, etc).
 
Vishal Hegde
Ranch Hand
Posts: 1077
Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is bash and ksh never heard it before
 
Rob Spoor
Sheriff
Pie
Posts: 20512
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shells for Linux and Unix; don't mind them. They are basically the same as cmd.exe.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic