public class StringDemon12
{
public static void main(
String args[])
{
String a = "newspaper";
System.out.println(a);
a = a.substring(5,7);
System.out.println(a);
char b = a.charAt(1);
System.out.println(b);
a = a + b;
System.out.println(a);
}
}
OUTPUT:
newspaper
ap
p
app
Hi All,
with respective to the above program how for
char b = a.charAt(1);
System.out.println(b);
the output is p
can anybody provide the explanation for the above?
thanks
venkat