0
String x= "Computer"; String y= " Application "; System.out.println(x.substring(1,5));
give the output of the above line...☝☝
5 Respuestas
+ 2
It's "ompu" the 5 is not inclusive.
+ 2
@George Rabbat
Maybe you should first take your own advice!
The output is as I said "ompu".
I did test it. I also read the documentation. See for yourself.
First agument is starting index. Second argument (if present) Is the end index not including.
http://docs.oracle.com/javase/7/docs/api/java/lang/String.html
+ 1
@ChaoticDawg you right!
in C# as i mentioned
in Java as your answer!
thanks for infos
0
omput
0
@ChaoticDawg it starts with index (1) then counting 5 characters after it... so it's "omput"
test it on code editor or IDE