Game Preview

String & Math Methods in Java

  •  English    10     Public
    Use predefined classes and there methods correctly within a program including String and Math classes as well as Integer, and Double as wrapper classes.
  •   Study   Slideshow
  • True or False: String is a reference data type.
    True
  •  10
  • Which Java method is used to find the length of a String?
    length()
  •  10
  • Which String method returns the index (the position) of the first occurrence of a specified character in a string?
    indexOf()
  •  10
  • What is txt.charAt(6)?
    W
  •  10
  • What is the output of the following line of code?
    10.0
  •  10
  • What is the output of the following code segment?
    Program
  •  10
  • What is the output of the following line of code?
    1000.0
  •  10
  • What is the output of the following line of code?
    74.0
  •  10
  • What is the output of the following line of code?
    20.0
  •  10
  • System.out.print("Welcome\n" + "\"Everyone\"");
    :)
  •  10