EduLearn - Online Education Platform

Welcome to EduLearn!

Start learning today with our wide range of courses taught by industry experts. Gain new skills, advance your career, or explore new interests.

Browse Courses

Method overriding and polymorphism in java

Polymorphism:   poly–>many   class customer { void Fillform(String name,int mob,String email) { ——– ——— } void Fillform(String name,int mob1,int mob2,String email) { ——– ——— } } class Bank { public static void main(String args[]) { Customer a=new Customer(); a.Fillform(“a”,123,"abc@gmail.com”);   Customer b=new Customer(); b.Fillform(“b”,123,456,"def@gmail.com”); }} ———————— –>occur at compile time(Method overloading)   —>occur at […]

What is final value in java

//Final class==> //final class cannot be extended(no any subclass can able to inherit it) Example program import java.io.*; final class Shape { void draw() { System.out.println(“Drawing shape..”); } }   class Finalmethod { public static void main(String args[]) { Shape obj=new Shape(); obj.draw(); } }

Final variable in java

Final variables==> final variables means constant–>once assigned,its value cannot be changed   class Finalvariables { final int speedlimit=60;   void display() { //speedlimit=70;//error System.out.println(“speed limit=” +speedlimit); } public static void main(String args[]) { Finalvariables object=new Finalvariables(); object.display(); }}  

Java program practice questions

Here’s a simple Java program to calculate the cost price of one item, based on total selling price and profit import java.util.Scanner; public class CostPriceCalculator { public static void main(String[] args) { Scanner sc = new Scanner(System.in); // Input total selling price and profit System.out.print(“Enter total selling price of 15 items: “); int sellingPrice = […]

Java simple program for practice

  Here’s a simple Java program that accepts the  number of late days and calculates the fine or displays the membership cancellation message: import java.util.Scanner;   public class LibraryFine { public static void main(String[] args) { Scanner sc = new Scanner(System.in);   // Input number of late days System.out.print(“Enter number of days late: “); int […]

simple Java code to count the number of zeroes in the number

simple Java code to count the number of zeroes in the number ✅ Java Code: public class CountZeroes { public static void main(String[] args) { int number = 120003; int count = 0;   while (number != 0) { if (number % 10 == 0) count++; number = number / 10; }   System.out.println(“Number of […]

What is perfect number in java program

✅ What is a Perfect Number? A number is perfect if the sum of its proper divisors (excluding itself) equals the number.   Example: 28 → 1 + 2 + 4 + 7 + 14 = 28 import java.util.Scanner;   public class PerfectNumber { public static void main(String[] args) { Scanner sc = new Scanner(System.in); […]

EduLearn - Online Education Platform

Welcome to EduLearn!

Start learning today with our wide range of courses taught by industry experts. Gain new skills, advance your career, or explore new interests.

Browse Courses

Popular Courses

[Course Image]

Introduction to Programming

Learn the fundamentals of programming with Python in this beginner-friendly course.

12 Hours Beginner
[Course Image]

Data Science Essentials

Master the basics of data analysis, visualization, and machine learning.

20 Hours Intermediate
[Course Image]

Web Development Bootcamp

Build modern websites with HTML, CSS, JavaScript and popular frameworks.

30 Hours Beginner
[Course Image]

Digital Marketing Fundamentals

Learn SEO, social media marketing, email campaigns and analytics.

15 Hours Beginner
Educational Website Footer