ICSE IMPORTANT 2 MARK QUESTIONS COMPUTER, Summaries of Computer science

ICSE important 2 mark questions all chapters

Typology: Summaries

2023/2024

Available from 06/25/2024

scoremaster-icse-java
scoremaster-icse-java 🇮🇳

4 documents

1 / 120

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Java revisions
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Partial preview of the text

Download ICSE IMPORTANT 2 MARK QUESTIONS COMPUTER and more Summaries Computer science in PDF only on Docsity!

Java revisions

What are the character sets available in java?

Java uses character sets while writing a program. The

character sets are

  • Letters
  • Digits
  • Operators
  • Delimiters

What is an Unicode?

  • It is a 16 bit code
  • It uses hexadecimal to express a character
  • capable to represent almost every character of well-known

languages of the world.

  • Standard encoding system used to encode a character in any

computer language

What are escape sequence?

  • Java have certain nongraphic characters (nongraphic characters are

those characters that can not be

  • typed directly from keyboard e.g. backspace, tab, carriage return etc.).
  • Those nongraphic character can be represented by escape sequence. An

escape sequence is represented by backslash followed by one or more

character.

  • The few escape sequence characters are:
  • \n - new line
  • \t - Horizontal Tab
  • \v - Vertical Tab
  • \b – Backspace
  • " - Double Quotes etc.

What are literals? How many types of integer literals

are available in Java?

  • A literal is sequence of characters used in a program to represent a constant

value.

  • It is otherwise called as constants.
  • For example 'A' is a literal that represents the value A of type char, and 17L is

a literal that represents the number 17 as value of type long.

Different types of literals available in Java, they are:

  • Integer literal
  • Float literal
  • Boolean literal
  • Character literal
  • String literal
  • null literal

What is an identifier? What is the identifier

formatting rule of Java? OR What are the rules for

naming a variable?

  • Identifiers are names given to different parts of a program

e.g. variables, functions, classes etc.

  • The identifiers in Java
    • Can contains alphabets, digits, dollar sign and underscore.
    • Must not start with a digit.
    • Can not be a Java keywords.
    • Can have any length and are case-sensitive.

State the difference between = and ==.

  • = is an assignment operator, which assigns value to a variable.
  • == is a relational operator, which is used for checking equality or not of two items.

State the difference between token and

identifier.

  • The smallest individual unit in a program ,such as keyword, identifier, literal, etc. is called a Token.
  • Whereas, Identifier is a name given to a variable or class or object or array or a method.

5. State the two types of Java programs

Ans: - 1. Stand Alone Application

  1. Internet Applet

6. State the the difference between boolean

literal and character literal

Ans: - A boolean literal can be either 'true' or 'false' as its value. A character literal is composed of a single character enclosed within a pair of single quotes, e.g., 'A'.

8. Name OOP's principles.

  • Ans: - Abstraction, Encapsulation, Inheritance, Polymorphism.

9. Define bytecode.

  • Ans: - Bytecde is a platform independent Java instruction for the Java processor chip called JVM.

11. Define Encapsulation.

  • Ans: - Wrapping of data and functions of a class together so that they can be applied as a unit to perform any operation is termed as Encapsulation.

12. Define Abstraction.

  • Ans: - Abstraction refers to an act of representing essential features without including background details.