try {
Socket s = new Socket("127.0.0.1", 4200);
InputStreamReader streamReader = new InputStreamReader(s.getInputStream());
BufferedReader reader = new BufferedReader(streamReader);
String advice = reader.readLine();
System.out.println("Today you should: " + advice);
} catch(IOException ex) {
ex.printStackTrace();
}