Create Software Components 

Using Java Level 2

 

 

Course Info

Scheme

Resources

Tutorials

Java Demos

Utilities

Links


 

    Quiz 1

Some Java Basics

There are 10 questions

Question 1.         

To change directories in DOS you use the command...

 

(a)   cd

(b)   dir

(c)   md

(d)   change 

Question 2.         

Java can be used to create which type of programs?

(a)   applications

(b)   servlets

(c)   applets

(d)   applets and applications 

Question 3.         

An application will run in a browser.  True or false?

_______________________________

Question 4.         

An applet will run in a browser.  True or false?

_______________________________

Question 5.         

Which line of code will NOT produce an error from the Java compiler

(a)   System.out.println

(b)   system.out.printl

(c)   System.Out.println 

(d)   system.out.Println

Question 6.         

Java source code is written in a file which is saved with the extension

(a)   .class

(b)   .txt

(c)   .java

(d)   .exe

Question 7.         

A .java file contains code defining a Java class.  True or false?

_______________________________

Question 8.         

The line of code that will output the string "goodbye world!" to the screen is...

(a)   System.out.println("goodbye world!")

(b)   System.out.println("goodbye world!);

(c)   System.out.println("goodbye world!");

(d)  System.out.println(goodbye world!);  

Question 9.         

I have written some source code for an application and saved it to a file called "myApp.java" .  Which command would I type into the command prompt window to compile my source code?

(a)   appletviewer myApp.java

(b)   java myApp

(c)   myApp.java 

(d)   javac myApp.java

Question 10.   

Which command would I type into the command prompt window to run my application called  "myApp.java"?

(a)   appletviewer myApp.java

(b)   java myApp

(c)   myApp.java 

(d)   javac myApp.java

 

        

 

  Site Home 

Java Home   

  Forum  

Course Info

Welcome

Overview

Assessment

Qualification

Scheme of Work

Assignments

Resources

Information

Blackboard

Learning Center

Web Materials

Reading

Java Demos

Utilities

Links

Lecture Materials

Tutorials & Notes

Exercises

Activities

Quizzes

 

Site Home

Top

Unit Home

ADR 2002