Java Program to Count Number of Objects Created for Class

This is a Java Program to Find Out the Number of Objects Created of a Class. Whenever an object is made of a class, its constructor is invoked. Whenever the constructor runs we increment the counter value. Hence number of objects created of a class equals to the counter value. Here is the source code … Read more

advertisement

Passing and Returning Objects in Java

This is a Java Program to Implement the Concept of Passing the Object and Return Object. Enter length and breadth of rectangle as input. After that we create object of that class and pass the reference variable to two different methods. Now we calculate area for two different objects and return them to main method. … Read more

advertisement

Java Program to Illustrate Use of Various Boolean Operators

This is a Java Program to Illustrate the Use of Various Boolean Operators. Enter any two boolean values as input. After that we perform various boolean bitwise opeartions like AND, OR, XOR and NOT to get desired output. Here is the source code of the Java Program to Illustrate the Use of Various Boolean Operators. … Read more

advertisement

Java Program to Find Largest of Three Numbers using Ternary Operator

This is a Java Program to Find Largest Between Three Numbers Using Ternary Operator. Enter any three integer numbers as an input from which you want to find the largest integer. After that we use ternary operator(?, >, : ) to find largest number as the output. Here is the source code of the Java … Read more

advertisement

Java Program to Find Arithmetic Sum by Passing Argument Using Method Overloading

This is a Java Program to Find Arithmetic Sum of 2 or 3 or 4 Variables by Passing Argument using Method Overloading. Two or more methods within the same class that share the same name but with different parameter declarations are called overloaded methods, and the process is referred to as method overloading. Here we … Read more

advertisement

Java Program to Convert Integer Values into Binary

This is a Java Program to Convert Integer Values into Binary. Enter any decimal number as an input. After that we operatons like modulo and division to convert the gven input into binary number. Here is the source code of the Java Program to Convert Integer Values into Binary. The Java program is successfully compiled … Read more

advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.