This is a Java Program to Illustrates Use of Static Inner Class. We made a Outer class and define a static Inner class in it. We define a non static method as show() method in inner class and we try to call this method by inner class object and outer class object and we get

This is a Java Program to Illustrates Use of Abstract Class and Method. Here we made add() and multiply() as abstract methods in parent class which are defined in child class and we can call all these mehods via making object of child class. Here is the source code of the Java Program to Illustrates

This is a Java Program to Illustrates Use of Chaining Constructor. Here, we use this() to achieve Constructor Chaining and there must be atleast one constructor which is not having this() as a first line. Constructor Chaining can be achieved in any order. Here is the source code of the Java Program to Illustrates Use

This is a Java Program to Demonstrate Usage of a Static Variable x in the Test Class. Here we made a variable X as a static variable and if we try to access that from main() directly then it will not show any error and executed. It proves that all static things of a class

This is a Java Program to Demonstrate Usage of an Instance Variable x in the Test Class. Here we made a variable X as an instance variable and if we try to access that from main() directly then it will show error and it proves that all non – static things of a class always

This is a Java Program to Illustrate the Use of HashCode() Method. The hashcode of a Java Object is simply a number, it is 32-bit signed int, that allows an object to be managed by a hash-based data structure. We have to implement hashcode() method of a class in such way that if two objects

This is a Java Program to find GCD and LCM of Two Numbers Using Euclid’s Algorithm. Euclid’s Algorithmis an algorithm, a step-by-step procedure for performing a calculation according to well-defined rules, and is one of the oldest numerical algorithms in common use. We divide the two numbers entered by the user and remainder become divisor

This is a Java Program to Identify Missing Numbers in a Given Array. We made a method as getMissingNo in which we pass the array and length of the array as arguments and using this method we calculate the missing number and hence we get the desired output. Here is the source code of the

This is a Java Program to Segregate 0s on Left Side & 1s on Right Side of the Array. Here is a function to segregate all 0s on left and all 1s on right as segregate0and1. We define an array and pass this array along with its length to the function and segregate 0s and

This is a Java Program to Convert the Given Binary Number into its Equivalent Decimal. We make a class with two methods one for input and other for conversion and access this by object of this class. We first take the input as Binary from user. We define a method as convert() to convert the