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

Java palindrome program in java

//Checking the string is palindrome or not by using stack and queue   class Palindrome { public static void main(String args[]) { String str=”madam”;   Queue<Charcter> q=new LinkedList<>();   Stack<Character> s=new Stack();   for(char ch:str.toCharArray())//ch=m { q.add(ch);//m s.push(ch);//m }   boolean isPalindrome=true;     while(!q.isEmpty())//false { if(q.remove()!=s.pop()) { isPalindrome=false; break; } } if(isPalindrome)//true System.out.println(str +”is […]

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”, […]

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 […]

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(); } }

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 […]

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