Posts

Showing posts from April, 2026

📢 Join My WhatsApp Channel JavaWithSumit

Get Daily ICSE Java Notes, Programs & Exam Tips 🚀

👉 Join Now

Important Java Programs for Beginners | Grade, Fibonacci, Armstrong, Pattern & More

Chapter 1: Programs  Question 1: WAP to check if a number input by the user is even or odd. Solution:  import java.util.Scanner; class EvenOdd { public static void main(String args[]) { Scanner sc = new Scanner(System.in); System.out.print("Enter a number: "); int n = sc.nextInt(); if(n % 2 == 0) System.out.println("Even Number"); else System.out.println("Odd Number"); } } Input: n=8 Output: Even Number Question 2:  WAP to check if a letter input by user is vowel or consonant. Solution:  import java.util.Scanner; class VowelConsonant { public static void main(String args[]) { Scanner sc = new Scanner(System.in); System.out.print("Enter a letter: "); char ch = sc.next().charAt(0); ch = Character.toLowerCase(ch); if(ch=='a' || ch=='e' || ch=='i' || ch=='o' || ch=='u') ...

Introduction to Object Oriented Programming in Java

Image
  Introduction to Object Oriented Programming and Java Introduction Object Oriented Programming (OOP) is a modern programming approach in which a program is designed using objects and classes . Java is a popular object-oriented programming language widely used in schools, colleges, and the software industry. This chapter helps students understand the basic concepts of OOP and Java , which form the foundation of advanced programming. 1. Principles of Object Oriented Programming Object Oriented Programming is based on four main principles : Abstraction Encapsulation Inheritance Polymorphism Procedure Oriented Programming vs Object Oriented Programming Procedure Oriented Programming      Object Oriented Programming Program is divided into functions Program is divided into objects Data is not well protected Data is well protected Less secure More secure Example: C language Example: Java, C++ Reusability is less Reusability is high 1. Abstractio...

Introduction to Java

Image
Introduction to Java   Java is a high-level, object-oriented programming language prescribed in the ICSE Class 10 Computer Applications syllabus . It helps students learn programming in a structured and logical way while preparing them for board examinations. Java was developed by Sun Microsystems in 1995 and is now maintained by Oracle . One of its most powerful features is platform independence , meaning a Java program can run on any system using the Java Virtual Machine (JVM). For ICSE students, Java focuses on logic building, program structure, and problem-solving, rather than just memorizing syntax. Topics like loops, arrays , strings, and methods are frequently asked in exams, making Java a high-scoring subject. Types of Java Programs  : 1. Applet Programs and Application Programs In this article, we will clearly explain: What is a Java Application Program ? What is a Java Applet Program ? Differences between Applet and Application ICSE exam-focu...