Method Overloading in Java

Method overloading in Java is a programming concept when programmer declares two methods of the same name but with different method signature, e.g. change in argument list or change in a type of argument. Method overloading is one of the ways through which Java supports polymorphism. We may overload the method by changing the argument list of the method. … Continue reading Method Overloading in Java

Working of main Method in Java

Let’s understand the working of Main() method in Java, Main() method is necessary to start the java application, main() method in Java is a standard method which is used by JVM to start execution of any Java program. The main() method is referred as an entry point of Java application. main() method in Java is run by the main thread which is a non-daemon thread and … Continue reading Working of main Method in Java

Static Variable in Java

Static variables are variable which belongs to the class and not to object (Instance of the class). Some facts about Static variables – Static variables are initialized only once. A single copy of Static Variables shared by all the instance of the class i.e Static variable value same for all the instance of the class. Static variable can be accessed without … Continue reading Static Variable in Java

Introduction to Java Programming

Java programming language was originally developed by Sun Micro-systems, later on, which is merged in Oracle Inc. Java is one of the world’s most important and widely used computer languages. As of 2015, Java is one of the most popular programming languages in use, particularly for client-server web applications, with a reported 9 million developers … Continue reading Introduction to Java Programming

Find Smallest and Largest number in N numbers without using Array

This is most common asked question in Java Interview are, How do you find the smallest and largest number in N numbers without using the Array in Java. Well, Can you write the program to solve this problem? It’s easy to solve this problem.   To solve this issue, All you need to do is start … Continue reading Find Smallest and Largest number in N numbers without using Array

Difference Between Java and JavaScript

Many of us think that JavaScript is part of Java platform, which is not true. In truth, JavaScript has nothing to do with Java, the only common thing between them is word “Java” Java is high-level Programing language and JavaScript is a scripting language.   JavaScript is a client-side scripting language for HTML, developed by … Continue reading Difference Between Java and JavaScript

What is Difference between Loop and Enhanced Loop in Java

We have used both loop and enhanced loop to iterate over arrays and collections like a list, set, or map. There are many differences between them like- enhanced for loop is much more easy to use than for loop. In for loop you need to manage the steps manually. But at the same time, for … Continue reading What is Difference between Loop and Enhanced Loop in Java

throws Keyword in Java

In java, throws the keyword is used to declare an exception. We know there are two types of exception checked and unchecked Exception. Checked exceptions(compile time) are those which force the programmer to handle it, without handle these exceptions the program doesn’t compile successfully. While unchecked exception(Runtime) doesn’t get checked during compilation.   “throws keyword” is mainly used for handling … Continue reading throws Keyword in Java

Super Keyword in Java

Super keyword is associated with the Inheritance in Java. super keyword which refers to the immediate parent of a class. In Java whenever you create the instance of the subclass, an instance of the parent class is created implicitly.   Uses of Super Call immediate parent class constructor using super() Call immediate parent class method using … Continue reading Super Keyword in Java

Static Method in Java

You can use the static keyword before method name to make the method static. Some facts about static methods- Static Method belongs to the class and not to the object(Instance of the class). The static method can access only static data. It can’t access non-static data of the class. The static method can call only other static methods and can’t call a non-static method from … Continue reading Static Method in Java