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 collection frameworks in arrays

  Arrays in java import java.util.*; class ASC { public static void main(String args[]) { ArrayList<String> slist=new ArrayList<String>(); slist.add(“honey”);//0 slist.add(“joes”);//1 System.out.println(slist.indexOf(“joes”)); ArrayList<String> slist2=new ArrayList<String>(); slist2.addAll(slist); System.out.println(slist); System.out.println(slist2); }}

What is Collection framework in java

Collection framework:   A Java collection framework provides an architecture to store and manipulate a group of elements or objects   –>It “Provides an architecture” – means it gives a well-structured set of classes and interfaces.   –>”To store, retrieve, and manipulate” – covers the basic operations like adding, removing, searching, sorting, etc.   –>”Group […]

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 program for printing an element

      Here’s a simple Java program that takes a sentence as input and prints the number of letters in each word: βœ… Java Program: Count Letters in Each Word import java.util.Scanner;   public class WordLengthCounter { public static void main(String[] args) { Scanner scanner = new Scanner(System.in);   // Input sentence System.out.print(“Enter a […]

Java practice programs

The function accepts two positive integers ‘r’ and ‘unit’ and a positive integer array ‘arr’ of size ‘n’ as its argument,’r’ represents the number of rats present in an area,’unit’ is the amount of food each rat consumes and each ith elements of an array ‘arr’ represents the amount of food present in ‘i+1’ house […]

What is anagram in java language

What is an Anagram? An anagram is a word or phrase formed by rearranging the letters of another word or phrase, using all the original letters exactly once.   βœ… Example of Anagrams: “listen” β†’ “silent”   “race” β†’ “care”   “evil” β†’ “vile”   “a gentleman” β†’ “elegant man” (ignoring spaces and case)   […]

Solid principles in java language

)Open/Closed Principle(OCP) Software entities should be open for extension but closed for modification. This allows adding new function without altering existing code.     class AreaCalculator { public double calculateArea(String shape,double radius,double length,double breadth) { if(shape.equals(“circle”)) { return Math.PI*radius*radius; } else if(shape.equals(“rectangle”)) { return length*breadth; } } class OCPviolation { public static void main(String args[]) […]

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

Remove the specific number in java

Remove the specific number from the given input   i/p:1200   number to remove:2   output: 100     class Remove { public static void main(String args[]) { int n=1200,r=2,a,s=0,b=1;   while(n!=0)//1 { a=n%10;//a=1 if(a!=r)//1!=2(t) { s=s+b*a;//0+100*1–>s=100 b=b*10;//b=1000 } n=n/10;//0 } System.out.println(s);//100 } } βœ… Java Program: Remove a Specific Digit from Input import java.util.Scanner; […]

Java practice programs for leetcode

βœ… Java Program: Count Vowels and Numbers   import java.util.Scanner;   public class VowelAndNumberCounter { public static void main(String[] args) { Scanner scanner = new Scanner(System.in);   // Take input from the user System.out.print(“Enter a string: “); String input = scanner.nextLine();   // Initialize counters int vowelCount = 0; int numberCount = 0;   // […]

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