Tuesday, July 9, 2013

import java.util.*;

JAVA SCANNER CLASS:(util package)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

METHODS OF SCANNER CLASS:

Method Summary
 voidclose()
          Closes this scanner.
 Patterndelimiter()
          Returns the Pattern this Scanner is currently using to match delimiters.
 StringfindInLine(Pattern pattern)
          Attempts to find the next occurrence of the specified pattern ignoring delimiters.
 StringfindInLine(String pattern)
          Attempts to find the next occurrence of a pattern constructed from the specified string, ignoring delimiters.
 StringfindWithinHorizon(Pattern pattern, int horizon)
          Attempts to find the next occurrence of the specified pattern.
 StringfindWithinHorizon(String pattern, int horizon)
          Attempts to find the next occurrence of a pattern constructed from the specified string, ignoring delimiters.
 booleanhasNext()
          Returns true if this scanner has another token in its input.
 booleanhasNext(Pattern pattern)
          Returns true if the next complete token matches the specified pattern.
 booleanhasNext(String pattern)
          Returns true if the next token matches the pattern constructed from the specified string.
 booleanhasNextBigDecimal()
          Returns true if the next token in this scanner's input can be interpreted as a BigDecimal using the nextBigDecimal() method.
 booleanhasNextBigInteger()
          Returns true if the next token in this scanner's input can be interpreted as a BigInteger in the default radix using the nextBigInteger() method.
 booleanhasNextBigInteger(int radix)
          Returns true if the next token in this scanner's input can be interpreted as a BigInteger in the specified radix using the nextBigInteger() method.
 booleanhasNextBoolean()
          Returns true if the next token in this scanner's input can be interpreted as a boolean value using a case insensitive pattern created from the string "true|false".
 booleanhasNextByte()
          Returns true if the next token in this scanner's input can be interpreted as a byte value in the default radix using the nextByte() method.
 booleanhasNextByte(int radix)
          Returns true if the next token in this scanner's input can be interpreted as a byte value in the specified radix using the nextByte() method.
 booleanhasNextDouble()
          Returns true if the next token in this scanner's input can be interpreted as a double value using the nextDouble() method.
 booleanhasNextFloat()
          Returns true if the next token in this scanner's input can be interpreted as a float value using the nextFloat() method.
 booleanhasNextInt()
          Returns true if the next token in this scanner's input can be interpreted as an int value in the default radix using the nextInt() method.
 booleanhasNextInt(int radix)
          Returns true if the next token in this scanner's input can be interpreted as an int value in the specified radix using the nextInt() method.
 booleanhasNextLine()
          Returns true if there is another line in the input of this scanner.
 booleanhasNextLong()
          Returns true if the next token in this scanner's input can be interpreted as a long value in the default radix using the nextLong() method.
 booleanhasNextLong(int radix)
          Returns true if the next token in this scanner's input can be interpreted as a long value in the specified radix using the nextLong() method.
 booleanhasNextShort()
          Returns true if the next token in this scanner's input can be interpreted as a short value in the default radix using the nextShort() method.
 booleanhasNextShort(int radix)
          Returns true if the next token in this scanner's input can be interpreted as a short value in the specified radix using the nextShort() method.
 IOExceptionioException()
          Returns the IOException last thrown by this Scanner's underlying Readable.
 Localelocale()
          Returns this scanner's locale.
 MatchResultmatch()
          Returns the match result of the last scanning operation performed by this scanner.
 Stringnext()
          Finds and returns the next complete token from this scanner.
 Stringnext(Pattern pattern)
          Returns the next token if it matches the specified pattern.
 Stringnext(String pattern)
          Returns the next token if it matches the pattern constructed from the specified string.
 BigDecimalnextBigDecimal()
          Scans the next token of the input as a BigDecimal.
 BigIntegernextBigInteger()
          Scans the next token of the input as a BigInteger.
 BigIntegernextBigInteger(int radix)
          Scans the next token of the input as a BigInteger.
 booleannextBoolean()
          Scans the next token of the input into a boolean value and returns that value.
 bytenextByte()
          Scans the next token of the input as a byte.
 bytenextByte(int radix)
          Scans the next token of the input as a byte.
 doublenextDouble()
          Scans the next token of the input as a double.
 floatnextFloat()
          Scans the next token of the input as a float.
 intnextInt()
          Scans the next token of the input as an int.
 intnextInt(int radix)
          Scans the next token of the input as an int.
 StringnextLine()
          Advances this scanner past the current line and returns the input that was skipped.
 longnextLong()
          Scans the next token of the input as a long.
 longnextLong(int radix)
          Scans the next token of the input as a long.
 shortnextShort()
          Scans the next token of the input as a short.
 shortnextShort(int radix)
          Scans the next token of the input as a short.
 intradix()
          Returns this scanner's default radix.
 voidremove()
          The remove operation is not supported by this implementation of Iterator.
 Scannerskip(Pattern pattern)
          Skips input that matches the specified pattern, ignoring delimiters.
 Scannerskip(String pattern)
          Skips input that matches a pattern constructed from the specified string.
 StringtoString()
          Returns the string representation of this Scanner.
 ScanneruseDelimiter(Pattern pattern)
          Sets this scanner's delimiting pattern to the specified pattern.
 ScanneruseDelimiter(String pattern)
          Sets this scanner's delimiting pattern to a pattern constructed from the specified String.
 ScanneruseLocale(Locale locale)
          Sets this scanner's locale to the specified locale.
 ScanneruseRadix(int radix)
          Sets this scanner's default radix to the specified radix.

No comments:

Post a Comment

Animated Social Gadget - Blogger And Wordpress Tips