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

Display elements by hashset in java

Add and display the elements(4 elements) using HashSet, check if an element exists there in a hashset,remove the element..   Find the smallest and largest element(number) using treeset   class Display { public static void main(String args[]) { HashSet<String> a=new HashSet<String>();   a.add(“apple”); a.add(“mango”); a.add(“banana”); a.add(“apple”); //apple mango banana   System.out.println(“mango is there..”+a.contains(“mango”));   a.remove(“mango”); […]

Java simple program for convert number ti words

Here’s a simple Java program that converts a given integer into its word representation, printing each digit’s corresponding English word in the same order.   ✅ Java Program: Convert Number to Words import java.util.Scanner;   public class NumberToWords { // Array to store words for digits 0-9 static String[] digitWords = { “zero”, “one”, “two”, […]

Solid principles in java language

Solid Principles:   Solid Principle is an acronym for five design principles that help in creating more maintainable, flexible and scalable software. These Five principles were introduced by Robert C. Martin   1) Single Responsibility Principle(SRP): A class should have only one reason to change, meaning it should have only one job or responsibility   […]

What is setter method in java

setter method:   class Bank { private int minimumbalance=2500;   public int setminimumBalance(int value)//setter method { this.minimumbalance=value;//minimumbalance=10000 System.out.println(minimumbalance); } }   class Accountholder { public static void main(String args[]) { Bank bb=new Bank(); bb.setminimumBalance(10000);   }}  

Java practice questions to find second largest number

Write a program to find the second largest element in the array   class Array { public static void main(String args[]) { int arr[]=new int[5]; //50 10 20 60 55 0 1 2 3 4 int i; Scanner s=new Scanner(System.in); for(i=0;i<arr.length;i++) { arr[i]=s.nextInt();// to fill the values in an array }   int fmax=arr[0]; //50 […]

Sum of digits in java code

Program import java.util.Scanner; public class SumOfDigits { public static void main(String[] args) { Scanner sc = new Scanner(System.in); // Input a number System.out.print(“Enter a number: “); int number = sc.nextInt(); int sum = 0; while (number != 0) { sum += number % 10; // get last digit number = number / 10; // remove […]

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