ADVERTISEMENT
ADVERTISEMENT

Java Class and Object Programs

Java solved programs based on class and objects: Here you will find programs, which are implemented using class and objects in java with solution, output and explanation.

This section contains programs on Class and Objects, here you will learn how to create classes and their instances, calling the class methods etc.

Here you will find programs from printing simple message using class to create complex classes.

List of Java Class and Object Programs

  1. Java program to print message using class
    This java program will print message using class method - here, we will print the message by using same class method and other class method.
  2. Java program to find area and perimeter of a circle using class
    In this java program, we will read radius of a circle and find their area and perimeter, this program will be implementing using class and objects. Here value will be reading and printing through class methods.
  3. Java program to count all digits of an integer number using class
    In this program, we will read a positive integer number and find the count of all digits using a class. For example, if the input number is 12345 - the count of all digits will be 5.
  4. Java program to find sum and product of all digits of an integer number using class
    In this program we will read a positive integer number and then calculate product of all digits using a class. For example, if input number is 12345 - sum of all digits, product of all digits will be 15 , 120.
  5. Java program to check whether a given number is palindrome or not using class
    In this example, we will read a positive integer number and check whether the entered number is a palindrome number or not.
  6. Java program to check whether a given number is armstrong or not using class
    In this example, we will read a positive integer number and check whether the entered number is an Armstrong number or not.
  7. Java program to add two distnace using class
    In this java program, we will read two distances in feet and inches and find their sum, here program is implementing using class and objects concept.
ADVERTISEMENT




ADVERTISEMENT


Comments and Discussions!

ADVERTISEMENT

ADVERTISEMENT

ADVERTISEMENT

ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT

Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates

© https://www.includehelp.com some rights reserved.