Code example for Scanner

Methods: close, next, nextInt, nextLine

0
	 * @param args 
	 */ 
	public static void main(String[] args) {
		// TODO Auto-generated method stub 
		try { 
			Scanner in = new Scanner(new File("clientConf.ini"));
			String serverAdd;
			String string = in.nextLine();
			String[] tmp = string.split(" = ");
			serverAdd = tmp[1];
			in.next();
			in.next();
			int port = in.nextInt();
			in.close();///////////////////////
			if(Client.init(serverAdd, port)){
				 
				if(!Client.isConnectedToServer()){ 
					System.out.println("Cannot connect the server!");
					 
					System.exit(-1);
				}