ГлавнаяРейтингиЧемпионатыРегистрацияТусовкаФорум Поиск

 Вы можете создать собственный тест и разместить на своем сайте

Тест: Java Programmer

Описание теста:
Java Programmer
Пройти тест >>

Which of the following is illegal?

public class Test {
static int age;
public static void main (String args []) {
age = age + 1;
System.out.println("The age is " + age);

Which of the following are correct?

Which of the following return true?

Which of the following are so called "short circuit" logical operators?

Which of the following are acceptable?

public class Test {
static int total = 10;
public static void main (String args []) {
new Test();
public Test () {
System.out.println("In test");
int temp = this.total;
if (temp > 5) {

Which of the following is correct:

What is the correct declaration of an abstract method that is intended to be public:

Under what situations do you obtain a default constructor?

Which of the following are acceptable to the Java compiler?

Assuming a method contains code which may raise an Exception (but not a Runtime Exception), what is the correct way for a method to indicate that it expects the caller to handle that exception:

public void divide(int a, int b) {
try {
int c = a / b;
catch (Exception e) {
System.out.print("Exception ");
} finally {

Which of the following statements is correct for a method which is overriding the following method:

public void add(int a) {...}

Given the following classes defined in separate files:

class Vehicle {
public void drive() {
System.out.println("Vehicle: drive");

class Car extends Vehicle {
public void drive() {
System.out.println("Car: drive");

public class Test {
public static void main (String args []) {
Vehicle v;
Car c;
v = new Vehicle();
c = new Car();
v = c;

What will be the effect of compiling and running this class Test?

Where in a constructor, can you place a call to a constructor defined in the super class?

Which variables can an inner class access from the class which encapsulates it?

What class must an inner class extend:

In the following code, which is the earliest statement, where the object originally held in e, may be garbage collected:
1. public class Test {
2. public static void main (String args []) {
3. Employee e = new Employee("Bob", 48);
4. e.calculatePay();
5. System.out.println(e.printDetails());
6. e = null;
7. e = new Employee("Denise", 36);
8. e.calculatePay();
9. System.out.println(e.printDetails());

What is the name of the interface that can be used to define a class that can execute within its own thread?

What is the name of the method used to schedule a thread for execution?

Which methods may cause a thread to stop executing?

Which of the following methods are defined on the Graphics class:

Which of the following layout managers honors the preferred size of a component:

Given the following code what is the effect of a being 5:

public class Test {
public void add(int a) {
loop: for (int i = 1; i < 3; i++){
for (int j = 1; j < 3; j++) {
if (a == 5) {
break loop;
System.out.println(i * j);

What is the effect of issuing a wait() method on an object

The layout of a container can be altered using which of the following methods:

Using a FlowLayout manager, which is the correct way to add elements to a container:

Given that a Button can generate an ActionEvent which listener would you expect to have to implement, in a class which would handle this event?

Which of the following, are valid return types, for listener methods:

Assuming we have a class which implements the ActionListener interface, which method should be used to register this with a Button?

In order to cause the paint(Graphics) method to execute, which of the following is the most appropriate method to call:

Which of the following illustrates the correct way to pass a parameter into an applet:

Which of the following correctly illustrate how an InputStreamReader can be created:

What is the permanent effect on the file system of writing data to a new FileWriter("report"), given the file report already exists?

What is the effect of adding the sixth element to a vector created in the following manner:

new Vector(5, 10);

What is the result of executing the following code when the value of x is 2:

switch (x) {

case 1:
case 2:
case 3:
case 4:

What is the result of executing the following fragment of code:

boolean flag = false;
if (flag = true) {
} else {

What is the result of executing the following Java class:

import java.awt.*;
public class FrameTest extends Frame {
public FrameTest() {
add (new Button("First"));
add (new Button("Second"));
add (new Button("Third"));

public static void main(String args []) {
new FrameTest();

Consider the following tags and attributes of tags:
2. ALT
Which of the above can be used within the APPLET tags?

Забыли пароль?

  Нас более 345 тысяч!

О проекте :: Реклама :: Сотрудничество :: Наши партнеры :: О создателях
TopList Яндекс цитирования