Difference between path band classpath in Java

1).Path is an environment variable which is used by the operating system to find the executables. Classpath is an environment variable which is used by the Java compiler to find the path, of classes.ie in J2EE we give the path of jar files. 2).PATH is nothing but setting up an environment for operating system. Operating […]

Java 7 Features

1. Strings in Switch: public void testStringInSwitch(String param){        final String JAVA5 = “Java 5”;        final String JAVA6 = “Java 6”;        final String JAVA7 = “Java 7”;        switch (param) {            case JAVA5:               […]

Explanation of oops concepts

Object means a real word entity such as pen, chair, table etc.Object-Oriented Programming is a methodology or paradigm to design a program using classes and objects. It simplifies the software development and maintenance by providing some concepts: Object Class Inheritance Polymorphism Abstraction Encapsulation Object Any entity that has state and behavior is known as an object. For […]

What is thread in Java.

Thread is a program in execution. All Java programs have at least one thread, known as the main thread, which is created by the JVM at the program’s start, when the main() method is invoked with the main thread. In Java, creating a thread is accomplished by implementing an interface and extending a class. Every […]