Posts tagged "Core Java "

Tag Archives: Core Java

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

Let’s see the Application of 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 … Continue reading Static Variable in Java

Introduction to Java Programming

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 … Continue reading Introduction to Java Programming

Find Smallest and Largest number in N numbers without using Array

This is most commonly asked question in Java Interview are, How do you find 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 with Integer.MIN_VALUE … Continue reading Find Smallest and Largest number in N numbers without using Array

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

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

Let’s see, What is 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 … Continue reading Static Method in Java

How to Increment and Decrement Date in JAVA

Let’s see, How can you increment and decrement Date in Java. In Java, we need to perform operations on Date like Add date in current date or Subtract date from Current Date. Sometimes we need to get the tomorrow date or yesterday date.   In Java, you can achieve the Date operation using two ways. … Continue reading How to Increment and Decrement Date in JAVA

Packages in Java

Packages are nothing more than the way we organize files into different directories according to their functionality, usability as well as the category they should belong to. So java package is a group of similar types of Classes, Interfaces, and sub-packages. It’s easy to organize the files into packages. The packaging also helps us to avoid class name … Continue reading Packages in Java