0% found this document useful (0 votes)
9 views4 pages

Class Viii Computer - CH - 5 - Programming in Java and Bluej Book Work PG 83,84 Fill in The Blanks

Uploaded by

rk1611935
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)
9 views4 pages

Class Viii Computer - CH - 5 - Programming in Java and Bluej Book Work PG 83,84 Fill in The Blanks

Uploaded by

rk1611935
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/ 4

Class

VIII
Computer - Ch - 5 - Programming In Java And BlueJ

Book work pg 83,84

Fill in the blanks.

1. Java is a programming language which programs simple tasks by defining the data the tasks
manipulate.

2. Java was developed by James Gosling.

3. Java Application Programming Interface is used to input and output, create a GUI or create a
network connection.

4. JVM is used to interpret bytecode before it's run by the computer.

5. Each statement in Java is terminated by a Semi-colon.

True or False.

1. Every Java statement must end in a Semi-colon. True

2. A class is defined within an object. False

3. Java was developed by Oracle. False

4. Java Virtual Machine is a hardware where the Java API is installed. True

5. Java uses automatic memory management. True Tick

the correct option.

1. Which is a bytecode?

Ans. Compiled code

2. A multi-thread programming language can .

Ans. Program the CPU to handle mire than one task at one time.

3. A robust programming language is one which .

Ans. Uses strongly typed data, uses automatic memory management, can do garbage collectionand has an
exception handling mechanism.

4. Define a line comment.

Ans. It is a line explaining code that the compiler ignores when creating bytecode.

Q.1 What is Java?


Ans. Java is a programming language and a computing platform for application development. It was first
released by Sun Microsystems in 1995 and later acquired by Oracle Corporation. It is one of the most used
programming language. It is an object-oriented language similar to C++, but with advanced and simplified
Class
VIII Java is free to access and can run on all platforms.
features.

Q.2 What is Java API?


Ans. The java API is a set of libraries that can be used to create a Graphical User Interface, take inputs,
provide output and establish network communication.

Q.3 What is the role of JVM in Java?


Ans. The java virtual machine is responsible for executing the code in a specific environment. The
environment could be on any device, such as smartphone, where the Internet acts as the web environment .
Java bytecode is the instruction set of JVM.

Q.4 Write any four features of Java?


Ans. The four features are-
1. Java is simple.
2. Java is object-oriented programming.
3. Java is portable
4. Java is robust

Q.5 What is BlueJ?


Ans. BlueJ is an Integrated Development Environment for the Java programming language. This software
application helps to provide a more precise interface for creating projects and coding in Java. BlueJ is
mostly used in education as it allows students to use an interactive, visual environment to create programs.

Q.6 Why do we use comments in Java?


Ans. Comments are used to annotate your code so that it becomes easy to understand it later. Comments can
be about why the source code was written, who wrote it and a version number or date of code.
Class
VIII
Computer

Lesson - 6 - Decision Control In Java

A. Fill in the blanks.

1. Integer data types cannot be an unsigned data types.

2. String data type is an object and must take a literal enclosed in quotes.

3. Single letter, number or symbol enclosed in single quotes is a char data type.

4. Conditional operator are useful for performing a decision-making test in a program.

5. Char data types are based on the Unicode scheme.

B. State true or false.

1. Literals are a type of variable which can take only image data types. False

2. Char is the only unsigned data type in Java. True

3. Boolean data type is capable of taking either one or both of the values ON and OFF. True.

4. There are only four types of arithmetic operators, excluding the modulo. True

5. There are four types of operators arithmetic, assignment, relational and conditional. True

C. Tick the correct option.

1. The memory size of int data is .

Ans. 4 bytes

2. Chara cannot store .

Ans. Images

3. Strings cannot store .

Ans. Images.

Q.1 What do you mean by data type?


Ans. Java provides many data types, each with a characteristic keyword. Each data type defines
how much memory space the variable will take and the range of values it can store.

Q.2 How many data types are there in Java?


Ans. There are two basic types of data types-
1. Primitive data type
2. Object data type
Class
VIII
Q.3 Write the names of primitive data types.
Ans. Primitive data types are of eight types-
1. Byte
2. Short
3. Int
4. Long
5. Float
6. Double
7. Char
8. boolean

Q.4 Define Int data type.


Ans. It stores whole number without decimal points and no fractions. Since computer memory is
limited, there is a limit to the int a computer will allow to be stored. The memory size is 4 bytes.

Q.5 How many types of operator are there in Java? Define Arithmetic operator.
Ans. There are four types of operators are there-
1. Arithmetic
2. Assignment
3. Relational
4. Conditional
Arithmetic operator- These perform mathematical operations. There are 7 arithmetic operators, including
binary and unary operators. These are- +, -, *, /, %, ++, --

You might also like