java - Why does SimpleDateFormatter returns an error -


this method called , should give time out void msgout(string s)

        simpledateformat sdf = new simpledateformat("dd.mm.yyyy hh:mm:ss");         string uhrzeit = sdf.format(new date());          msgout("[system] zeit: "+uhrzeit);          txtsname.settext("");         txtsname.requestfocus();     } 

but every time returns error:

exception in thread "awt-eventqueue-0" java.lang.stackoverflowerror     @ sun.util.calendar.zoneinfo.getoffsets(zoneinfo.java:236)     @ java.util.gregoriancalendar.computefields(gregoriancalendar.java:2340)     @ java.util.gregoriancalendar.computefields(gregoriancalendar.java:2312)     @ java.util.calendar.settimeinmillis(calendar.java:1804)     @ java.util.calendar$builder.build(calendar.java:1508)     @ sun.util.locale.provider.calendarproviderimpl.getinstance(calendarproviderimpl.java:88)     @ java.util.calendar.createcalendar(calendar.java:1666)     @ java.util.calendar.getinstance(calendar.java:1655)     @ java.text.simpledateformat.initializecalendar(simpledateformat.java:657)     @ java.text.simpledateformat.<init>(simpledateformat.java:601)     @ java.text.simpledateformat.<init>(simpledateformat.java:580)     @ server.beftime(server.java:261) 

(the line simpledateformat sdf = new simpledateformat("dd.mm.yyyy hh:mm:ss"); line number 261 , returns error...

could please me??

add: same -> same (copied & pasted) method works in class without errors...


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -