Study

String & Math Methods in Java

  •   0%
  •  0     0     0

  • What is the output of the following line of code?
    1000.0
  • What is the output of the following line of code?
    74.0
  • Which Java method is used to find the length of a String?
    length()
  • System.out.print("Welcome\n" + "\"Everyone\"");
    :)
  • Which String method returns the index (the position) of the first occurrence of a specified character in a string?
    indexOf()
  • What is the output of the following line of code?
    10.0
  • What is the output of the following code segment?
    Program
  • True or False: String is a reference data type.
    True
  • What is the output of the following line of code?
    20.0
  • What is txt.charAt(6)?
    W