Enter your keyword


Java Precedence

Definition Java has well-defined rules for specifying the order in which the operators in an expression are evaluated when the expression has several operators. For example, multiplication and division have a higher precedence than addition and subtraction. Precedence rules can be overridden by explicit parentheses. Precedence order. When two operators share an operand the operator […]

Strings -1

DefinitionStrings, which are widely used in Java programming, are a sequence of characters. In the Java programming language, strings are objects. The Java platform provides the String class to create and manipulate strings. Example String str1=”Hello”; String str2=”Hello”; String str3=new String(“Hello”) //Using constructor. If(str1 == str2) System.out.println(“Equal 1”); Else System.out.println(“Not Equal 1”); If(str1 == str3) […]


Definition Swing is a set of program component s for Java programmers that provide the ability to create graphical user interface ( GUI ) components, such as buttons and scroll bars, that are independent of the windowing system for specific operating system . Swing components are used with the Java Foundation Classes ( JFC ). […]


DefinitionIn computer programming, a primitive (pronounced PRIH-muh-teev ) is a basic interface or segment of code that can be used to build more sophisticated program elements or interfaces. Example Primitive Data Types: byte a = 68; char a = ‘A’ int decimal = 100; int octal = 0144; int hexa = 0x64; “Hello World” “two\nlines”char […]


Definition Method overloading in Java is a programming concept when programmer declare two methods of same name but with different method signature e.g. change in argument list or change in type of argument. method overloading is a powerful Java programming technique to declare method which does similar performance but with different kind of input. One […]

Inner Classes

Definition Inner classes are a security mechanism in Java. We know a class cannot be associated with the access modifier private, but if we have the class as a member of other class, then the inner class can be made private. And this is also used to access the private members of a class. Example […]

Java Interface

Definition An interface in Java is similar to a class, but the body of an interface can include only abstract methods and final fields (constants). A class implements an interface by providing code for each method declared by the interface. Example /* File name : MammalInt.java */ public class MammalInt implements Animal{ public void eat(){ […]


Definition A thread is a single sequential flow of control within a program.Some texts use the name lightweight process instead of thread. A thread is similar to a real process in that a thread and a running program are both a single sequential flow of control. However, a thread is considered lightweight because it runs […]

Call by Value & Call by Refrence

Definition in java…. Example class Workways{ int data=50; void change(int data){ data=data+100;//changes will be in the local variable only } public static void main(String args[]){ Workways op=new Workways(); System.out.println(“before change “+op.data); op.change(500); System.out.println(“after change “+op.data); } } Commonly asked interview questions on Constructors 1.What is difference between call by value and call by reference Answer […]

AWT Swings in JAVA

Definition Constructor in java is a special type of method which is used to initialize the object. Constructor is invoked at the time of object creation. It constructs the values i.e. provides data for the object. Java provides default constructor for every java class implicitly. Commonly asked interview questions on Constructors 1. Define Constructor? Answer […]