ppt 3

Cards (15)

  • Comments in Java
    Java supports single-line and multi-line comments very similar to C and C++. All characters available inside any comment are ignored by Java compiler.
  • print
    leaves the insertion point after the last character of the value of expression
  • println
    positions the insertion point at the beginning of the next line
  • Java primitive data types
    • byte
    • short
    • int
    • long
    • float
    • double
    • boolean
    • char
  • Arithmetic Operators
    • Used in mathematical expressions in the same way as algebra
  • Arithmetic Operators
    • +
    • -
    • *
    • /
    • %
  • Logical Operators
    • &&
    • ||
    • !
  • Assignment Operators
    Used to assign values to variables
  • Scanner methods
    • nextInt()
    • nextLong()
    • nextFloat()
    • nextDouble()
    • next()
  • Output statement is used to display a prompt or message and show results. In Java, output on the standard output device (the monitor) is accomplished by using the standard output object System.out.
  • println – positions the insertion point at the
    beginning
    of the next line.
  • Data types – is a set of values together with a set of operations allowed on those values.
  • +
    adds values on either side of the operator
  • Arithmetic operators are used in mathematical expressions in the same way that they are used in algebra.
  • Primitive datatypes are predefined by the language and named by a keyword>,