import java.util.Random; public class RandomStringGen { private static final String CHAR_LIST = “1234567890”; private static final int RANDOM_STRING_LENGTH = 4; /** * This method generates random string * @return */ public String generateRandomString(){ StringBuffer randStr = […]
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 […]
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: […]
>setx JAVA_HOME “C:\Program Files\Java\jdk1.8.0” >setx PATH “%PATH%;%JAVA_HOME%\bin”;
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 […]