1 Flashcards
What is Java
Java is a computer language that enables the users to communicate with the computer
Name the different character sets
-Letters
-Digits
-Operators
Name the types of operators and give one example of each
- Arithmetical operator: +, - , *
-Logical operators:&& , || , !
- Relational operators: < , <= , > , >= , ==
-Delimiters: ? , . , -
What is Unicode
Unicode is a standard encoding system created by Unicode consortium that is used to encode a character in any computer language
What are the advantages of Unicode
- 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
What is ASCII and what does it stand for
ASCII stands for American standard code for information interchange.
The ASCII codes are decimal numbers represented in 7 binary digits.
What are escape sequences? In which program are they frequently used in?
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.
Explain the escape sequences:
\n
\t
"
\
'
- 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
What is a token?
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
What are literals?
Literals are the constants of a Java program
Name the types of literals
Integer literals
Real literals
Character literals
String literals
Boolean literals
Null literals
Define identifiers
It is a term used to represent program elements such as function name or class name
What is an assignment
Assignments is the process of storing constants in a variable using a token ‘=’ symbol.
How does initialisation of a variable take place? Explain.
- 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.
What are punctuators
Punctuators are the punctuation signs used as special characters in Java.