Programming - String Buffers - Discussion

You Are Here :: Home > JAVA > String Buffers - Discussion

 



Q.

StringBuffer sb=new StringBuffer("New Delhi"); String s=sb.substring(4); In the above,from where to where the substring is formed.                         


A. only 4th position string B. from 4th to till end
C. from first to last D. none

Answer: Option B
Explaination:

 


Here New Delhi is the String.from 4th position the substring is formed untill last.




Discussion

Your Comments Goes here...
NameDiscussion