Programming Languages Java Objective
Jan 03, 2013

Consider the following code snippet:

String city = new String(“Dehradun”);
System.out.println(city.length());

What will be the output?

Choose the correct answer:
A) 4
B) 8
C) 12
D) 16
Detailed Explanation

The putput will be the lenght of string.

number of character in Dehradun=8.

Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback