Skip to main content

Posts

Showing posts with the label Java

When programming java.lang.NullPointerException occurs, what causes this error? how to solve?

 When we programming with java, we can see 'java.lang.NullPointerException' error often. NullPointerException is kinds of RuntimeException.  This error occurs as a Java program attempts to use a null when an object is required. Let's see what this means.          Integer   invalid_intObject  =  null ;          System . out . println ( invalid_intObject . intValue ());  This codes makes NullPointerException because invalid_intObject is object but it's null. Below is valid code.            Integer   invalid_intObject  =  0 ;          System . out . println ( invalid_intObject . intValue ());  But in real programming world, this is not that simple to debug. So, what's in real programming world? we always call functions that we did not make...

Installing Visual Studio Code for Windows Java Developer Easily

   Visual Studio Code is very popular for developers and Java is the most popular programming language in present world.  So in this article, I will show how to set up Visual Studio Code for java in Windows 10 very easily.  VS Code Team released Visual Studio Code with JDK. This is very cool because installing JDK need some configurations but in this download link that kinds of uncomfortable process removed. (downlaod jdk and install / configure environment / configure visual studio code) Let's see how comfortable it is. Download and Install Visual Studio Code for Java Click  Download and Install the Coding Pack for Java - Windows via this link Install Coding Pack for Java Installing Components Finished Setup Wizard Now you can see Lau...