Java tutorial
//package com.java2s; //License from project: Apache License import android.util.Log; import java.io.BufferedReader; import java.io.IOException; import java.io.PrintWriter; public class Main { public static int numberBounce(PrintWriter out, BufferedReader in) { try { String theString = in.readLine(); if (theString != null) { int num = Integer.parseInt(theString); ++num; out.println("" + num); return num; } } catch (IOException e) { Log.e("NUMBER_BOUNCE_METHOD", e.getMessage()); } return -1; } }