click below
click below
Normal Size Small Size show me how
Java, pt 1
Java Language terms and concepts for upcoming exam or quiz
| Question | Answer |
|---|---|
| Characteristics of Java | Simple, OOP, Distributed, Interpreted, Robust, Secure, Architecture-neutral, Portable, Performance, Multithreaded, & Dynamic |
| Credited as the main(or at least a major part of) developer of the Java program | James Gosling |
| Origin of Java | 1991’s Green Project with the purpose of finding the next big thing in computer programming. Based on C++ while removing weakness and enhancing strengths. |
| JDK | Java Development Kate. What you will use to develop programs, but NOT run them. |
| Java strings are ONLY defined by | (“ ”) double quotation marks |
| Void methods return | Nothing |
| Class | Every program must have at least 1. With a Unique name that is a noun, descriptive, and start w/ upper case letter. |
| Public and Private | Access modifiers |
| Main Method | Usually the second line. Required to run a class. Program is executed and ran from here. OOP version of a function. Use verbs when not naming the main one. |
| Statement Terminator | (;) Semi Colan |
| Reserved Words Definition | Keywords or words that have a specific meaning to the compiler and cannot be used for other purpose() |
| Comments | (//) |
| Blocks | ({}) Also called Curley braces |
| Used for arguments for a method | () |
| Primitive Data Types | Specifies the size and type of variable values, and it has no additional methods. byte, short, int, long, float, double, boolean and char |
| Reserved Words | char, boolean, float, double, int, byte, short, long, Final, while, for, do, return, Switch, Case, default, and Break |
| Concatenation | (+) Helps combines parts of a string to create a sentence |
| Strongly Typed Language Definition | Must declare variable and variable type BEFORE USING IT!! (Like C++). |
| Variable names are called | Identifiers |
| Identifier Rules | Sequence of characters that consist of letters, digits, underscores(_), and dollar signs ($), CAN’T start with a digit, CAN’T be a reserved word, CAN’T be true, false, or null |
| Double type values are | More accurate than the float type values |
| Literal | Constant value that appears directly in the program |
| ++j | Pre Increment: Increment Var by 1, and use the new var value in the statement |
| j++ | Post Increment: Increment var by 1, but use the original var value in the statement |
| k = 1; j = k; i = j; | i = j = k = 1; |
| Int a = 10, b = 10, c = 10; | int a, b, c; |
| boolean type and operators = relational operators | (<, >, ==, !=, <=, >=) |
| Logical Operators | (&&, ||, !, ^) |
| Loops | Iterations |