To print something in java, you need to actually call the function that would print to the standard output.
In other words, you need to use System.out.print(What_you_want_to_print)
To see the output for your code, you need to adjust your code as follows:
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new
InputStreamReader(System.in));
String snumber = reader.readLine();
int number = Integer.parseInt(snumber);
if (number > 0)
number = number * 2;
else
number = number + 1;
System.out.println(number);
}
}
solved Input number in java input console