Note that there are some explanatory texts on larger screens.

plurals
  1. POJava NumberFormatException in SimpleDateFormat.getDateInstance()
    text
    copied!<p>I can't understand the reason of NumberFormatException in this code:</p> <pre><code>SimpleDateFormat format = (SimpleDateFormat) SimpleDateFormat.getDateInstance(); </code></pre> <p>Below is my LogCat output:</p> <pre><code>10-30 18:04:05.600: W/System.err(23899): java.lang.NumberFormatException: Invalid int: "" 10-30 18:04:05.600: W/System.err(23899): at java.lang.Integer.invalidInt(Integer.java:138) 10-30 18:04:05.600: W/System.err(23899): at java.lang.Integer.parseInt(Integer.java:359) 10-30 18:04:05.600: W/System.err(23899): at java.lang.Integer.parseInt(Integer.java:332) 10-30 18:04:05.600: W/System.err(23899): at java.util.Calendar.getHwFirstDayOfWeek(Calendar.java:807) 10-30 18:04:05.600: W/System.err(23899): at java.util.Calendar.&lt;init&gt;(Calendar.java:745) 10-30 18:04:05.600: W/System.err(23899): at java.util.GregorianCalendar.&lt;init&gt;(GregorianCalendar.java:338) 10-30 18:04:05.600: W/System.err(23899): at java.util.GregorianCalendar.&lt;init&gt;(GregorianCalendar.java:314) 10-30 18:04:05.608: W/System.err(23899): at java.text.SimpleDateFormat.&lt;init&gt;(SimpleDateFormat.java:378) 10-30 18:04:05.608: W/System.err(23899): at java.text.SimpleDateFormat.&lt;init&gt;(SimpleDateFormat.java:368) 10-30 18:04:05.608: W/System.err(23899): at java.text.DateFormat.getDateInstance(DateFormat.java:462) 10-30 18:04:05.608: W/System.err(23899): at java.text.DateFormat.getDateInstance(DateFormat.java:443) 10-30 18:04:05.608: W/System.err(23899): at java.text.DateFormat.getDateInstance(DateFormat.java:426) 10-30 18:04:05.608: W/System.err(23899): at com.mycompany.mypackage.InboxFragment$15.setViewValue(InboxFragment.java:396) </code></pre> <p><strong>Edit:</strong> The same exception for <code>DateFormat format = DateFormat.getDateInstance();</code></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload