0% found this document useful (0 votes)
14 views2 pages

ICSE Class10 Chapter1 Java Fundamentals

Chapter 1 of the ICSE Class 10 Computer Applications covers the fundamentals of Java, highlighting its object-oriented nature and key components such as classes, methods, and data types. It explains essential keywords, operators, and provides sample questions with answers to reinforce understanding. The chapter emphasizes the structure of Java programs and includes practical examples for coding basic functionalities.

Uploaded by

banerjeearchna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views2 pages

ICSE Class10 Chapter1 Java Fundamentals

Chapter 1 of the ICSE Class 10 Computer Applications covers the fundamentals of Java, highlighting its object-oriented nature and key components such as classes, methods, and data types. It explains essential keywords, operators, and provides sample questions with answers to reinforce understanding. The chapter emphasizes the structure of Java programs and includes practical examples for coding basic functionalities.

Uploaded by

banerjeearchna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

ICSE Class 10 Computer Applications - Chapter 1: Fundamentals of Java

Chapter 1: Fundamentals of Java

Key Concepts:

- Java is an object-oriented, high-level programming language.

- It uses classes, objects, and methods for programming.

- The structure of a Java program includes: class definition, main method, statements inside main().

Important Keywords:

- class, public, static, void, main, System.out.println()

Data Types in Java:

- int: integer type (e.g., 5, -10)

- double: decimal numbers (e.g., 4.5, -3.14)

- char: single character (e.g., 'A')

- boolean: true/false

Operators:

- Arithmetic: +, -, *, /, %

- Relational: ==, !=, <, >, <=, >=

- Logical: &&, ||, !

Sample Questions and Answers:

1. What is the use of 'main' method in Java?

-> It is the entry point of every Java application.

2. Define a variable. Give an example.

-> A variable is a named memory location. Example: int x = 10;

3. What is the output of the following code?

int a = 5; int b = 10;

System.out.println(a + b);
ICSE Class 10 Computer Applications - Chapter 1: Fundamentals of Java

-> Output: 15

4. Write a Java program to check if a number is even or odd.

int num = 7;

if(num % 2 == 0)

System.out.println("Even");

else

System.out.println("Odd");

5. Write a program to swap two numbers without using a third variable.

int a = 5, b = 10;

a = a + b;

b = a - b;

a = a - b;

Board Pattern-Based Program:

Write a program to find the sum of digits of a 3-digit number.

int num = 123, sum = 0;

while(num > 0) {

int digit = num % 10;

sum += digit;

num /= 10;

System.out.println("Sum = " + sum);

Output-Based Question:

int x = 4;

System.out.println(++x + x++);

-> Output: 5 + 5 = 10 (x becomes 6 after execution)

This chapter focuses on understanding the core building blocks of Java programs and how basic constructs

work.

You might also like