Getting Input From Keyboard with Java
07:30 | Author: Unknown

Hello guys.. finally i write article about java programming again.
I want to share about how to get input from keyboard in java.
Input from keyboard will be make your program become interactive, because user can input something, like name or everything.
Usually i use BufferedReader to get input from keyboard if we make program with console based.

Class BufferedReader be in package java.io.*, so we must add import java.io.* on top of your code program.
Now i wanna write an example :

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package org.wahyu.main;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
*
* @author gepenk
*/
public class GetInput {
public static void main(String[] args){
try {
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
String firstName = "";
String lastName = "";
System.out.println("Enter Your First Name : ");
firstName = bufferedReader.readLine();
System.out.println("Enter Your Last Name");
lastName = bufferedReader.readLine();
System.out.println("Your name is " + firstName + " " +
lastName);

} catch (IOException ex) {
Logger.getLogger(GetInput.class.getName()).log(Level.SEVERE, null, ex);
}

}
}



Output for program above is

Enter Your First Name :
wahyu
Enter Your Last Name
sumartha
Your name is wahyu sumartha


Ok now i will try to explain program above.
statement BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in)); means we declaration variable with BufferedReader class type.
To get input from keyboard we use method bufferedReader.readLine(); that return String value. This value will be save with String data type.
Ok guy's now .. you can try it..

Readmore...

Opera Software Community Seminar
10:04 | Author: Unknown

Today i'am become participant in Opera Software Community Seminar in Gadjah Mada University Yogyakarta. The seminar is so interest, my knowledge was increase when listen the speakers extend they presentation. The Speakers is Bruce Lawson, Zibin Chech, and the one and only indonesian girl's but i'm forget her name.

In that Seminar the speaker talk about how to build Open Web Standard and also promotion their product(Opera Browsers). Mr Bruce Lawson says Open Web Standard consist of HTML,CSS, and javaScript.
I'm very amazed when Mr.Bruce Lawson show some code from HTML 5 and CSS 3. For me it's something new. But After I try it at home, HTML 5 now only can work at Browser Opera 9.62 even at Mozilla Firefox 3.04. In HTML 5 is so simple to show date time picker, we not use javascript but only use HTML,

Beside of that the speakers also tell what web site which the most visited with indonesian.The web site is friendster. And Then The Speakers ask with the audience why indonesian people like to visited friendster?. No one audience brave to answer it, because no one answer his questions and then Mr.Bruce make his own conclusion, his conclusion is "Because at Friendster user can upload their photo".
Ehm... it's means indonesian people can called "NARCISSISM"(hehehe...).
Ok guy's i'am feel sleepy now, i'am only write my experience today when become participant in Opera University Seminar.
See you in next article....

Readmore...