Scanner Class in Java

 

Input by using Scanner Class

 The Scanner Class is defined within a Java Package(java.util.*; OR  Java.util.Scanner).There are more methods in class Scanner .

Creating Scanner Object

Scanner Class is available in system package java.util . You must import this package to avail the facilities contained in Scanner Class.

 

LinkedHashSet in Java

LinkedHashSet is maintains the insertion(insert the elements) order in Linked List.Elements get Sorted in the sequence order.

Converting an int to a binary in Java

 

By using Integer.toBinaryString() we can convert integer string into binary value.This is the best way to convert integer to a binary string in Java.

 

Java StringBuffer Reverse Example

 

The sequence of character contained in the string buffer is replaced by the reverse method(reverse()).String Buffer class is a mutable class means can be changed dynamically.

StreamTokenizer in Java

Stream Tokenizer takes an input stream(any String with seperator) and parses it into tokens, allowing the tokens to be read once at a time. 

 

Page 1 of 20

About Us

Rekha SetiaRekha Setia is a passionate blogger of Extra Computer Notes. if you have any ideas or any request me @