asssignmnt 3

Upload: syed-yasir-hussain

Post on 21-Feb-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/24/2019 asssignmnt 3

    1/3

    # Java.util.Scanner :

    Java.util.Scanner class is a simple text scanner which can parse primitive typeand string using regular expressions. Following are important points about Scanner.

    A scanner breaks its input in into tokens using a delimeter pattrens which by default matches whitespaces.

    A scanning operation may block waiting for input.

    A scanner is not safe for multithreaded use without external synchronization.

    Class Declaration:

    Public final class scanner

    extends object

    implements iterator

    There are many others classes used in java for consol input.

    lang

    math

    applet

    awt

    sql

    io

    # java.lang.math Class:

    The java.lang.math class contains method for performing basic numeric operationssuch as the elementory exponential , logarithm, square root and trignometric functions.

    Class Declaration:

    Following is the declaration for java.lang.math class:

    Public final class math

    extends object

    Class Methods:

    Some methods of this class are:

    Static double abs (double a)

    Static float abs(float a)

    Static int abs(int a)

    Static long abs(long a)

  • 7/24/2019 asssignmnt 3

    2/3

  • 7/24/2019 asssignmnt 3

    3/3

    Automatic memory schema like garbage collection makes it so that programmer doesnot have to worry so much about memory management issues, so he or she can focus more on developing the application they need to develop.