Java
Java
What's new with the stop(), suspend() and resume() methods in JDK 1.2?
Ans :The stop(), suspend() and resume() methods have been deprecated in JDK 1.2. .
Is null a keyword?
Ans :The null value is not a keyword..
Which characters may be used as the second character of an identifier,but not as the first
character of an identifier?
Ans :The digits 0 through 9 may not be used as the first character of an identifier but they may
be used after the first character of an identifier. .
What modifiers may be used with an inner class that is a member of an outer class?
Ans :A (non-local) inner class may be declared as public, protected, private, static, final, or
abstract..
Which method of the Component class is used to set the position and size of a component?
Ans :setBounds().
How many bits are used to represent Unicode, ASCII, UTF-16, and UTF-8 characters?
Ans :Unicode requires 16 bits and ASCII require 7 bits. Although the ASCII character set uses
only 7 bits, it is usually represented as 8 bits. UTF-8 represents characters using 8, 16, and 18
bit patterns. UTF-16 uses 16-bit and larger bit patterns. .
Is sizeof a keyword?
Ans :The sizeof operator is not a keyword..
oes garbage collection guarantee that a program will not run out of memory?
Ans :Garbage collection does not guarantee that a program will not run out of memory. It is
possible for programs to use up memory resources faster than they are garbage collected.It is
also possible for programs to create objects that are not subject to garbage collection .
What restrictions are placed on the location of a package statement within a source code
file?
Ans :A package statement must appear as the first line in a source code file (excluding blank
lines and comments)..
What value does readLine() return when it has reached the end of a file?
Ans :The readLine() method returns null when it has reached the end of a file. .
What is clipping?
Ans :Clipping is the process of confining paint operations to a limited area or shape. .
What are order of precedence and associativity, and how are they used?
Ans :Order of precedence determines the order in which operators are evaluated in
expressions. Associatity determines whether an expression is evaluated left-to-right or right-
to-left.