Basics Flashcards

1
Q

They perform operations on numbers, strings, and other values

A

literals

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

(5) basic literals

A

integers, characters, strings, boolean, and arrays

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

numbers

A

integer or int

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

A single character can represent a digit, a letter, or another symbol

A

character or char

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

To write a single character, we wrap in

A

single quotes
NOTE: Character literals can represent alphabet letters, digits from ‘0’ to ‘9’, whitespaces (‘ ‘), or some other symbols

incorrect: ‘abc’, ‘543’

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

text information

A

string

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

To write strings, we wrap characters in

A

double quotes
NOTE: “text”, “I want to learn Kotlin”, “123456”, “e-mail@gmail.com”

A string can also contain just one single character, like “A”. Do not confuse it with the character ‘A’, which is not a string.

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

(6) relational operators

A

== — equal to X

!= — not equal to X

> — greater than X

> = — greater than or equal to X

< — less than X

<= — less than or equal to X

NOTE: Boolean value (true or false)

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

a way of writing numbers using only two digits, 0 and 1

A

binary numeral system or base-2 numeral system

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

when a digit reaches 1, the next number resets this digit to 0 and causes the digit to the left to raise

A

binary counting

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

work with binary numbers of a fixed length

A

zero padding

NOTE:
- triads: 000, 001, 010, and so on;

  • tetrads: 0110, 0111, and so on;
  • 8-digit numbers: 00000000, 01010101, and so on.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

An 8-digit binary number
NOTE: 256 possible values from 0 to 255

A

byte

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

a way of storing information

A

binary code

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

each character in the text string represented by a 7-digit binary number

A

ASCII code
(American Standard Code for Information Interchange)

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

Red, Green, Blue
NOTE: color encoding system stores 3 binary values

A

RGB

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

a standard for encoding and representing text

A

Unicode

17
Q

every symbol corresponds to a number

A

code point

18
Q

Unicode is represented with

A

U+
NOTE: Capital Letter Q is U+0051

19
Q

(6) escape or control sequences

A

‘\n’ is the newline character;

‘\t’ is the tab character;

‘\r’ is the carriage return character;

’\’ is the backslash character itself;

’'’ is the single quote mark;

’"’ is the double quote mark.

20
Q

isDigit()

A

returns true if the given character represents a digit (‘1’, ‘2’, etc); otherwise, false

21
Q

isLetter()

A

returns true if the given character represents a letter (‘a’, ‘B’, ‘m’, etc); otherwise, false

22
Q

isLetterOrDigit()

A

returns true if the given character represents a letter or a digit; otherwise, false

23
Q

isWhitespace()

A

returns true if the given character represents a whitespace (‘ ‘, or ‘\t’, or ‘\n’); otherwise, false

24
Q

isUpperCase()

A

returns true if the given character is an uppercase character; otherwise, false

25
Q

isLowerCase()

A

returns true if the given character is a lowercase character; otherwise, false

26
Q

uppercaseChar()

A

returns the uppercase form of the given character

27
Q

uppercase()

A

returns a String with the uppercase form of the given character

28
Q

lowercaseChar()

A

returns the lowercase form of the given character

29
Q

lowercase()

A

returns a String with the lowercase form of the given character