How can i set null to integer variable initially instead of "0". I know already by default all int value is "0". I used String.valueOf() method etc. I dont want to print as "null". I want to print blank like " ". I get number format exception. Please give one solution for that.
Thanks in advance
Here is the code
public class IntegerDemo {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
String id="";
System.out.println(""+Integer.parseInt(id));
}
}