Lazy loading JS file / resource
15-Jul-2015 Javascript
Most of the websites are using Java script to enrich the webpage i.e.; To have a better UI components like date calendar control To validate the data entered by users To enable share pod It is...

Java for-each loop
08-Jul-2014 Java Core Java
For-each constructOne of the construct introduced since Java 1.5 is for-each loop. "for-each" loop is an enhanced version of a Java other looping constructs "for" and "while".Just consider below examp...

Java keyword & operator instanceof
08-Jul-2014 Java Core Java
instanceof"instanceof" is a Java keyword and a binary operator. It works on two operands, object reference on the left and class/interface name on the right. instanceof operator returns true if the ob...

Develop, Compile & Run a C/C++/Java program online
08-Jun-2014 Java
Online IDE CompilerOne of my friend has showed me an online IDE and compiler for C, C++, and Java programming languages. It's amazing, I've used it just to test the interface. I just thought I would ...

Sun Certified Java Professional (SCJP) 1.5 Question Bank - 12
08-Jun-2014 Java SCJP
Question: 56Given a class Repetition:1. package utils;2.3. public class Repetition {4. public static String twice(String s) { return s + s; }5. }and given another class Demo:1. // insert code here2.3....

Sun Certified Java Professional (SCJP) 1.5 Question Bank - 20
09-May-2014 Java SCJP
Question: 96A JavaBeans component has the following field:11. private boolean enabled;Which two pairs of method declarations follow the JavaBeans standard for accessing this field? (Choose two.)A. pub...

Linear search algorithm & Java program
08-May-2014 Java Java programs Algorithms
Linear searchLinear search is one of the basic search techniques that we've now. Although this is not a very good search technique, one should understand this concept. Let's consider our aim to search...

Java marker interface or tagged interface
08-May-2014 Java Core Java
Marker interfaceAn interface without any members declared in it is called as Marker interface. i.e.; no methods and no constants available in this interface. Marker interface is also called as tagged ...

Concatenating two characters puzzle
10-Apr-2014 Java Puzzles
Guess the output for below programpublic class CharPuzzle{ public static void main(String args[]) { System.out.println('A'+'B'); }}I think you've guessed that the above program prints the output...

Java toString() method - customizing it for your objects
08-Apr-2014 Java Core Java
java.lang.Object is the super class for all the Java objects. i.e.; every class extends to java.lang.Object by default. So, all the methods that are available in java.lang.Object class will be availab...