Java: How To Use Enum in Switch

When using enums in a switch, it is almost natural to assume they will be used like a regular switch. Unfortunately to accomodate enums, Java had to enhance its specification and enums in switch behave differently than regular switch statements in two significant and non-trivial ways.

Full article (198 words) »

Core Java: How To Get Java Source Code Line Number & File Name in Code

While debugging code Java programmers often use System.out.println(). It is important to write separate message in each System.out.println() so you can understand from the output where the problem lies.

Full article (169 words) »

Protected by Comment Guard Pro