Review the following: 1. Examples of high-level programming languages 2. What is
ID: 3555781 • Letter: R
Question
Review the following:
1. Examples of high-level programming languages
2. What is bytecode
3. What is an algorithm
4. Examples of primitive data types
5. Methods of JOptionPane
6. Two branching control structures
7. While loops
8. For loops
9. What is JFrame
10. What is an event listener
11.Differences between a value-returning method and a void method
12. Differences between passing a primitive data type variable and a reference variable as an argument to a method
13. Which Classes you don't need to import the java.lang package
14. Pay attention to the question, if it asks for int and the script declares doubles...
15. What are class modifiers
16. Use of private data members and public methods
17. What are constructors
18. How you compare values in two objects: if (object1 == object2)??
19. What is a finalizer, mutator, and accessor method
20. What is an array
21. Array dimensions
22. Creating and initializing arrays
23. Comparing values of arrays
24. Arrays of objects
25. Two dimensional arrays
Explanation / Answer
1. C++, Java, Python
2. Bytecode is an instruction set designed for efficient execution by a software interpreter
3. An algirithm is a step by step process for completion of any task
4. int, char, boolean, double etc
5. The methods of JOptionPane class are:
showConfirmDialog, showInputDialog, showMessageDialog, showOptionDialog
6. if-else and switch-case
7. Syntax:
while(condition){
statements;
}
Explanation: the statements inside the curly braces will repeat as long as the condition is true.
8. Syntax:
for(initial value; condition; increment){
statements;
}
Explanation: Starting with the initial value, the statements inside the curly braces will repeat as long as the condition is true. At the end of each loop, the increment statement will execute
9. JFrame is a class for GUI methods.
10. Event Listener waits for some action to be performed on it like mouse click, mouse hover etc.
11. value returning method returns a value to the method from which it is called, but void method returns no value.
12. A primitive data type makes a copy of the variable passed and uses that as a parameter of the method(changing the passed variable in a method does not affect the actual variable)
Reference parameter passes the address as an argument to the method(Changing it changes the actual variable)
13.
14.
15. public, private and protected
16. we can access a private class variable by using a public method of the class:
example, if a variable 'var' iss private in a class. We can get its value by defining a method getVar() which returns the value of var.
17. Constructors are methods of the class which are called automatically when object of a class is declared. It has the same name as that of the class, and these don't return any value
18. By overloading the == operator.
19. Finalizer is called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
20. Array is a collection of elements of similar daya types.
21. Array dimensions are the number of indices used to select an element of the array. Example, in a 2-dimensional array, the number of indices needed to access an element is 2.
22. An array can be created by below syntax:
dataType arrayName[] = new dataType[size];
An array can also be initialized at declaration like this:
dataType arrayName2[] = {value1, value2, .... value n};
23. To compare 2 arrays, can use a loop and compare each element one by one.
24. Array of objects can be defined as follows:
ClassName arrayName[] = new ClassName[size];
25. 2 dimensional arrays can be defined as an array of many 1-dimensional array (or a rectangular matrix)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.