1 Flashcards

1
Q

What is Java

A

Java is a computer language that enables the users to communicate with the computer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Name the different character sets

A

-Letters

-Digits

-Operators

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Name the types of operators and give one example of each

A
  • Arithmetical operator: +, - , *

-Logical operators:&& , || , !

  • Relational operators: < , <= , > , >= , ==

-Delimiters: ? , . , -

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is Unicode

A

Unicode is a standard encoding system created by Unicode consortium that is used to encode a character in any computer language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the advantages of Unicode

A
  • It is a universal coding scheme followed throughout the world.
  • It is a more efficient coding system than the ISO or IEC.
  • It supports uniform coding width for all the characters.

-A particular code of a character is always unique

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is ASCII and what does it stand for

A

ASCII stands for American standard code for information interchange.
The ASCII codes are decimal numbers represented in 7 binary digits.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are escape sequences? In which program are they frequently used in?

A

Non-graphic characters which are used as commands to direct the cursor while printing are known as escape sequences. They are frequently used in Java programming.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Explain the escape sequences:

\n

\t

"

\

'

A
  • as soon as this is encountered, the cursor moves to the next line on the screen for printing.
  • this is used to provide a gap (of 8 spaces) between the values while printing.
  • it is used when you want to display a message on the screen in such a way that a part needs to appear under double quotes
  • it is used to insert a backslash at the point of its appearance in the message or output
  • this is used to insert a single quote at the point of appearance in the output message
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is a token?

A

A token is a functional and fundamental unit of a computer program. Each individual component of a programming statement is referred to as a token

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are literals?

A

Literals are the constants of a Java program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Name the types of literals

A

Integer literals

Real literals

Character literals

String literals

Boolean literals

Null literals

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Define identifiers

A

It is a term used to represent program elements such as function name or class name

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is an assignment

A

Assignments is the process of storing constants in a variable using a token ‘=’ symbol.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How does initialisation of a variable take place? Explain.

A
  • Static initialisation - it uses direct assignment of a constant to a defined variable
  • Dynamic initialisation - when a variable gets initialised during the execution of program logic.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are punctuators

A

Punctuators are the punctuation signs used as special characters in Java.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Define separators and state their significance.

A

They are special characters in Java, which are used to separate the variables or the characters.

17
Q

What are operators

A

They are the tokens that perform Arithmetical or logical operations.

18
Q

What are keywords

A

They are the reserved words which are preserved by the system and carry special meaning for the system compiler.

19
Q

What are the types of data types? Explain.

A
  • Primitive data types- those which are independent of any other types.
    Classified as:
    Numeric and non-numeric
  • Non-primitive-
    (No definition)
    Classified as:
    Classes, arrays, interface
20
Q

Give classification of integer type

A

Byte, int, short, long

21
Q

Give classification of floating type

A

Float, double

22
Q

The character type contains only a single _____________

A

Character

23
Q

Name some well known characters and their ASCII codes

A

A-Z = 65-90

a-z = 97-122

0-9 = 48-57

24
Q

A character must always be enclosed within __________

A

Single quotes

25
Q

String must always be enclosed within __________

A

Double quotes

26
Q

What is an Arithmetical expression? Explain it’s types

A

A set of variables, constants and Arithmetical operators used to yield a meaningful result.

Types:

Pure expressions - uses all it’s components of same data types

Impure expression - uses one or more components are if different data types.

27
Q

In impure expressions, the data type of the result gets automatically converted into the highest data type available in the expression without any intervention of the user. This system types is known as ___________

A

Implicit type conversion

28
Q

Define explicit type conversion

A

It is when the data type gets converted to another data type after the users intervention the type conversion