• Post Reply Bookmark Topic Watch Topic
  • New Topic

Substring  RSS feed

 
Abder-Rahman Ali
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I have this Java code portion, what will the output be in this case?

String name = "Abder-Rahman";
String sub = name.substring(1,2);
System.out.println(sub);

And, how many arguments can the methos "substring" have?

I mean, how much can "?" be ---> substring(?).

Thanks.
 
fred rosenberger
lowercase baba
Bartender
Posts: 12563
49
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if you go to the API, you can find out for yourself how many parameters the method will take.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!