CSCI 1301 Exam 1-UGA Updated 2024/2025 Actual Questions and answers with complete solutions
.compareTo(); - compares to help with ordering alphabetic characters -If compare x1 to x2 and returns >0(+) then x1 comes after x2 -If compare x1 to x2 and returns <0(-) then x1 comes before x2 -if compare x1 to x2 and returns 0 then x1 ad x2 are equal .equals(); .equalsIgnoreCase(); - equality of 2 strings (just like == is for int) .indexOf(); - returns the index of a letter (position, because String starts with index 0) .length (); - returns int of how long the string is .toUpperCase(); .toLowerCase(); - all characters to upper case or lower case "" = ? - "" - 2 characters "+" "-" "*" "/" "()" "%" - math operators "=" - the assignment operator, gives a variable a value"high-level language" - A programming language like Java that is designed to be easy for humans to read and write. "keywords" that should NEVER be included in your code - if, public, class, while, for, print, etc. /* */ - comments out multiple lines // - comments out rest of the line n - forces to next line t - tab ++ - increment by 1 == is appropriate when... - determining if 2 ints, booleans, or chars have the same value 1 billion bytes (1,000 megabytes) - 1 GB 1 bit - smallest unit 1 million bytes (1,000 kilobytes) - 1 MB 1,000 bytes - 1 KB 4 bits - nibble8 bits - 1 byte an array - a collection of variables of the same type double [ ] temp = new double [7]; arrays are indexed with ____ - int auxiliary memory - exists once the computer turns off (hard drive) boolean - true or false bytes in larger units are ____ - files char - characters (letters) code HelloWorld - public class HelloWorld{ public static void main(String[] args){ S("Hello World"); } } constants - variables that next change in your code - written as: final int thisNumber = 4; or int THIS_NUMBER = 4; contingency - when the expression has at least one true or falsecontradiction - when the expression is always false CPU - (Central Processing Unit) The key component of a computer system, which contains the circuitry necessary to interpret and execute program instructions data types - say what the variable is storing do-while loop - same as the while loop expect the body of the loop is executed at least one time doing int 9 divided by int 10 will give you ___ (an integer answer) - 0 double or float - decimals e notation: 4x10^8 - 4e^8 Encapsulation - packages and hides details enumerations - limit the amount of values a variable can have Files are organized into ____ - folders or directories
Escuela, estudio y materia
- Institución
- CSCI 1301 -UGA
- Grado
- CSCI 1301 -UGA
Información del documento
- Subido en
- 27 de julio de 2024
- Número de páginas
- 8
- Escrito en
- 2023/2024
- Tipo
- Examen
- Contiene
- Preguntas y respuestas
Temas
-
csci 1301 uga
Documento también disponible en un lote