I
want to share how to Find for the last word from BUFFEREDREADER version in J2SE. You can use this code
but if you copy this code and paste in your blog/website, please insert this
link of article.
import java.io.IOException;
import java.io.InputStreamReader;
import javax.swing.JOptionPane;
public class GetInputFromKeyboard {
public static void main(String[] args) throws IOException {
BufferedReader dataIn = new BufferedReader(new InputStreamReader (System.in));
String word1 = "",word2 ="", word3="";
System.out.println("Enter Word 1 : ");
word1=dataIn.readLine();
System.out.println("Enter Word 2 : ");
word2=dataIn.readLine();
System.out.println("Enter Word3 : ");
word3=dataIn.readLine();
System.out.println(word1 +" "+ word2+" "+ word3);
}
}
0 komentar:
Posting Komentar