Home / MCQ Bank / Computer
Computer Strings

What will be the output of the following Java code? class output { public static void main(String args[]) { char ch; ch = "hello".charAt(1); System.out.println(ch); } }

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option B • e

Related Computer Questions

The two basic types of record-access methods are: The errors that can be pointed out by the compiler are Which of the following is an example to perform the most common XML manipulations using the XML objects invocation? RAM stands for___________? What will be the output of the following C# code? public class Generic<T> { public T Field; } class Program { static void Main(string[] args) { Generic<int> g2 = new Generic<int>(); Generic<int> g3 = new Generic<int>(); g2.Field = 8; g3.Field = 4; if (g2.Field % g3.Field == 0) { Console.WriteLine("A"); } else Console.WriteLine("Prints nothing:"); Console.ReadLine(); } }