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 example programs for practice

A company is validating usernames for its internal employee portal   Every employee enters their full name as a string like “john_123”   your job is to write a program that does the following:   1. Accept a string that represents a username   2. Check if the username (i) contains only lowercase letters, digits […]

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

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

Simple Java program to find the maximum and minimum elements in an array

Here’s a simple Java program to find the maximum and minimum elements in an array public class MinMaxInArray { public static void main(String[] args) { int[] arr = {12, 5, 7, 20, 3, 15};   int max = arr[0]; int min = arr[0];   for (int num : arr) { if (num > max) max […]

Sorting an array in java

//To sort an array   import java.util.Arrays; class sortArray { public static void main(String args[]) { int arr[]={50,25,30,55,13}; System.out.println(“The original array is: “); for (int num : arr) { System.out.print(num + ” “); } Arrays.sort(arr); System.out.println(“\nThe sorted array is: “); for (int num : arr) { System.out.print(num + ” “); } } }

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