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

Types of methods in java

Types of methods:   class Methods { public void add()//without returntype/without argument { int a=123; int b=10; System.out.println(“Addition=” +(a+b)); } } class Functiondemo { public static void main(String args[]) { Methods o=new Methods();//classname objectname=new classname(); o.add(); } }   import java.util.*; class Methods { public void sub(int x,int y)//without returntype/with /arguments { System.out.println(“Subtraction=” +(x-y)); } […]

Queue in java data structures

Given a string s consisting of words and spaces, return the length of the last word in the string.   A word is a maximal substring consisting of non-space characters only.       Example 1:   Input: s = “Hello World” Output: 5 Explanation: The last word is “World” with length 5. Example 2: […]

Without a return type and without arguments

In Java, a method can be defined with a return type and without arguments. This means the method returns a value but does not take any input parameters. ✅ General Syntax: returnType methodName() { // method body return value; // value must match returnType } In Java, methods can be categorized by whether they return […]

program to minus two numbers without using minus operator

Write a program to minus two numbers without using minus operator int a=5;b=2,c; c=(a+(~b))+1 System.out.println(c); c=(a+(~b))+1 ==>(5+(-3))+1 ==>(5-3)+1 ==>(2)+1 =>3 import java.util.Scanner; public class SubtractWithoutMinus { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.print(“Enter first number (a): “); int a = sc.nextInt(); System.out.print(“Enter second number (b): “); int b = sc.nextInt(); […]

Java Reserved Keywords

Java Reserved Keywords: Java has a set of keywords that are reserved words that cannot be used as variables, methods, classes, or any other identifiers. For example: break, char, double, final Literal: Any constant value which can be assigned to the variable is called literal/constant. Literals in Java is a synthetic representation of boolean, numeric, […]

Using java How to calculate illiterate people

int pop=80000,popmen,popwomen,poplit,litmen,litwomen,ilitmen,ilitwomen; popmen=(52*pop)/100; popwomen=pop-popmen; poplit=(48*pop)/100; litmen=(35*pop)/100; litwomen=pop-litmen; ilitmen=pop-litmen; ilitwomen=pop-litwomen; In A town,the percentange of men is 52. The percentage of total literacy is 48. If total percentage of literate men is 35 of the total population, Write a program to find the total number of illiterate men and women if the population of the town […]

Using java check whether a given letter is a vowel or a consonant.

Here is a simple Java program to check whether a given letter is a vowel or a consonant. ✅ Java Code: import java.util.Scanner; public class VowelOrConsonant { public static void main(String[] args) { Scanner sc = new Scanner(System.in); // Input a character System.out.print(“Enter a letter: “); char ch = sc.next().charAt(0); // Convert to lowercase for […]

Calculating marks by using java

class Marks { public static void main(String args[]) { int m1,m2,m3,m4,m5,total; float avg; System.out.println(“enter 5 marks”); Scanner s=new Scanner(System.in); m1=s.nextInt(); m2=s.nextInt(); m3=s.nextInt(); m4=s.nextInt(); m5=s.nextInt(); total=m1+m2+m3+m4+m5; avg=total/5; System.out.println(“Total=”+total); System.out.println(“Average=”+avg); if(m1>=35 && m2>=35 && m3>=35 && m4>=35 && m5>=35) { System.out.println(“Result=pass”); if(avg>=90 && avg<=100) { System.out.println(“Grade A”); } else if(avg>=80 && avg<=89) { System.out.println(“Grade B”); } else […]

Operators in java

Operators:In Java, operators are special symbols used to perform operations on variables and values. Java provides a rich set of operators categorized into several types: 🡪Arithmetic operator[+,-,*,/,%] 🡪Assignment operator Relational operator Logical operator Increment/Decrement Bitwise operator Conditional operator/ternary operator Assignment operator =, +=, -=, *=, /=, %= ✅ Arithmetic Operators Used for basic mathematical operations. […]

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