Basic Language Elements
Like any other programming language, the Java programming language is defined by grammar rules that specify how syntactically legal constructs can be formed...
2.1
Which of the following is not a legal identifier?
Select the one correct answer.
a2zödipus52pickup_classca$htotal#2.2
Which statement is true?
Select the one correct answer.
new and delete are keywords in...
2.4
Which of the following do not denote a primitive data value in Java?
Select the two correct answers.
"t"'k'50.5F"hello"false2.5
Which of the following primitive data types are not...
Default Values for Fields
Default values for fields of primitive data types and reference types are listed in Table 2.14. The value assigned depends on the...
2.7
Which of the following lines are valid declarations?
Select the three correct answers.
char a = '\u0061';char 'a' = 'a';char \u= 'a';ch\u0061r a = 'a';ch'a'r a =...
2.10
What will be the result of attempting to compile this class?
import java.util.*;
package com.acme.toolkit;
public class AClass {
public Other anInstance;
}
class Other {...
The main() Method
The mechanics of compiling and running Java applications using the Java 2 SDK are outlined in Section 1.10. The Java interpreter executes a...
2.12
Which of these are valid declarations of the main() method in order to start the execution of a Java application?
Select the two correct answers.
static void...
Chapter Summary
The following topics were discussed in this chapter:
basic language elements:
identifiers, keywords, literals, white spaces, and comments
primitive data types:
integral, floating-point, and Booleanconverting numbers...
2.1
The following program has several errors. Modify it so that it will compile and run without errors. (See Section on page for compiling and running...
AJAX popular information C# language guides Windows books and cookbooks
.......
С 2009 года мы стали переводить структура сайта на различные языки. Сайт теперь будет содержать книги не только на английском языке, но также и на других европейских языках, в том числе и на Русском языке.