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 example programs for Reversing each word

1)Reverse each word in a sentence   input: java is fun   output:avaj si nuf   import java.util.*;   class ASC { public static void main(String args[]) { String a=”java is fun”;   String b[]=a.split(” “);//b[java–>0 is–>1 fun–>2]   for(String c:b)//c=fun { StringBuilder s=new StringBuilder(c);//(fun) System.out.print(s.reverse()+” “);//avaj si nuf }     } } ———————————– […]

Java example programs for practicing

Missing Attendance roll number: Given roll numbers from 1 to N,one is missing. Find the missing number   int rolls[]={1,2,3,5}   output: Missing number=4   —————————————————————————— 2)Find Duplicate ID: In an employee array, one ID is duplicated. Find that duplicate   int empIDs={101, 103, 104, 101, 105}   output: Duplicate: 101   class DuplicateID { […]

Java factorial program with example

–>Should be able to define a solution of a problem in terms of solution of similar problems    –>Proper terminating condition Factorial==> 5!=>5x4x3x2x1 5!=5×4! 4!=4x3x2x1 4!=4×3! cimport java.util.*; class ASC {  static int fact(int n)//5   {    if(n==0)     return 1;    else     return n*fact(n-1);   } public static void main(String […]

Java practice questions for learning

import java.util.*;   class ASC { public static void main(String args[]) { Scanner s=new Scanner(System.in); int amount;   while(true) { System.out.println(“enter the amount to withdraw”);//2300 amount=s.nextInt();//2300   if(amount==0) { System.out.println(“exiting…”); break; }   if(amount%100!=0)2300%100==>00!=0 { System.out.println(“Invalid amount…”); }     int a=amount/2000; amount=amount%2000;   int b=amount/500; amount=amount%500;   int c=amount/100; amount=amount%100;   if(a>0) System.out.println(a+”x2000″); if(b>0) […]

Wrapper classes in java

Wrapper classes in java:   A wrapper class in java is a class whose objects wraps or contains primitive datatypes   Need: They convert primitive datatypes into objects   In collection framework, such as Arraylist and sets,will store only objects and not primitive datatypes     Primitive datatypes Wrapper classes   char————————Character int————————-Integer float———————–Float double———————–Double […]

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