Docsity

Java Programming Terms and Definitions, Exams of Computer Science

Toggle sidebar
bg1
JAVA TERMS LATEST UPDATED
many forms - ANSWER Polymorphism
key word used to define class variables and class methods - ANSWER static
bunch of classes - ANSWER Package
*, /, %, +, - - ANSWER Arithmetic operators
<, >, <=, >=, instanceof - ANSWER Relational operators
&&, || - ANSWER Logical operators
-expression, +expression, ++expression,!, etc. - ANSWER Unary operators
import the JOptionPane class - ANSWER import javax.swing.JOptionPane
A void method returns? - ANSWER nothing
Declare a new variable - rand - in the random class - ANSWER Random rand
= new Random();
What does rand.nextInt(10); return? Where rand is an object of the Random
Class. - ANSWER random integer between 0 and < 10
pf3
pf4
pf5
pf8

Partial preview of the text

Download Java Programming Terms and Definitions and more Exams Computer Science in PDF only on Docsity!

JAVA TERMS LATEST UPDATED

many forms - ANSWER Polymorphism key word used to define class variables and class methods - ANSWER static bunch of classes - ANSWER Package *, /, %, +, - - ANSWER Arithmetic operators <, >, <=, >=, instanceof - ANSWER Relational operators &&, || - ANSWER Logical operators

  • expression, +expression, ++expression,!, etc. - ANSWER Unary operators import the JOptionPane class - ANSWER import javax.swing.JOptionPane A void method returns? - ANSWER nothing Declare a new variable - rand - in the random class - ANSWER Random rand = new Random(); What does rand.nextInt(10); return? Where rand is an object of the Random Class. - ANSWER random integer between 0 and < 10

import statement to use the Random class? - ANSWER import java.util.Random; Methods consist of these two elements? - ANSWER header and body decision statements like (if - else) and loops can be called? - ANSWER control structures JavaDoc produces what type of documentation? - ANSWER HTML The method header definition contains arguments or parameters? - ANSWER parameters In the method call statement that uses variables, they are called? - ANSWER arguments Process of breaking down a problem into smaller pieces? - ANSWER functional decomposition When using System.out.printf or System.out.format should you use
or %n for a new line character? - ANSWER %n import statement goes before or after Javadoc comment? - ANSWER before References and Acknowledgements from CS 139 go before or after the import statement? - ANSWER before

A reusable software component. - ANSWER bean A binary operator has two arguments. ANSWER binary operator A bitwise operator is an operator that operates on two values a bit at a time, comparing each bit of the first value to the corresponding bit of the second value. ANSWER bitwise operator Keyword in the Java(TM) programming language used to resume program execution at the statement after the current statement. If preceded by a label, program execution resumes at the labeled statement. - ANSWER break Keyword in the Java(TM) programming language that defines a group of statements to be executed if a value specified matches the value defined by a preceding "switch" keyword. - ANSWER case Explicit conversion from one data type to another. - ANSWER casting A Java(TM) programming language keyword used to declare a block of statements to be executed in the event that a Java exception, or run time error, occurs in a preceding "try" block. - ANSWER catch If the superclass is not explicitly specified, the superclass will implicitly be - ANSWER Object Java(TM) Programming Language The type that defines the implementation of a particular kind of object. - ANSWER class

A method that is invoked without reference to a particular object. Class methods affect the class as a whole; they do not affect any particular instance of the class. - ANSWER class method a variable that tells the Java virtual machine* and Java-based applications (such as the tools in the JDK 1.1.X\bin directory) how to find the class libraries, including user-defined class libraries. - ANSWER classpath A variable that is associated with a class rather than with instances of the class. - ANSWER class variable A class pseudo-method that instantiates an object. - ANSWER constructor A keyword in the Java(TM) programming language that reenters the end of the currently executing loop - ANSWER continue A public class (or interface) that is a standard member of the Java(TM) Platform. - ANSWER core class The APIs that must be implemented in every implementation of a given Java platform edition. - ANSWER Core packages In the Java(TM) programming language, a keyword that may optionally appear as the last element of a "switch" statement (after all the "case" elements). - ANSWER default The location of knowledge within a module. - ANSWER encapsulation

The Java(TM) programming language keyword which is used to specify that an object reference does not point to an object. - ANSWER null The act of providing an alternate implementation of a method in a subclass of the class in which the method was first defined. - ANSWER overriding The Java(TM) programming language keyword in a method or variable declaration. It indicates that the method or variable is not visible outside its class. - ANSWER private It indicates that the method or variable is accessible only by elements residing in its class, subclasses, or classes in the same package. - ANSWER protected A Java(TM) programming language keyword that can be used in a method or variable declaration. It indicates that the method or variable can be accessed by elements residing in other classes. - ANSWER public A Java(TM) programming language keyword used to declare that a variable is a class variable. - ANSWER static called by the class rather than by an instance of the class, and can operate only on class variables. - ANSWER class methods Synonym for class method. - ANSWER static method A Java(TM) programming language keyword used to access members of a class inherited by the class in which it appears. - ANSWER super

A Java(TM) programming language keyword that can be used to represent an instance of the class in which it appears - ANSWER this If I have two classes in one file, only one of the classes can be? - ANSWER public If a class is declared as public or is referenced from another source file, the filename of the class must be called what? - ANSWER the class name Default location for.class files constructed by javac unless the - d option is used?

  • ANSWER Same as source file Assume keyboard is a Scanner object. Statement required at the end of code fragment to close the Scanner object. - ANSWER keyboard.close();