Preview

01 - Introducing Java

 1. Java runs on an estimated billion plus smartphones today because Google’s Android operating system uses Java APIs.

  False

  True

 2. Java was first released in the mid-1990s by _______________. It was designed to be easy to learn Java by programmers who already knew C and C++. (1 mark)

  Apple

  Microsoft

  Toshiba

  Sun Microsystems.

 3. Who is credited with being the 'creator of Java'?
creatorofjava1.jpg

  Bill Gates

  James Gosling

  Mark Zuckerberg

  Guido Van Rossum

 4. Which of the following on the list is Java used for? (1 mark)
Mobile applications (specially Android apps)
Desktop applications
Web applications
Web servers and application servers
Games
Database connection

  Desktop Applications only

  Mobile applications and Games only

  Android Applications only

  All of the items on the list are valid answers as Java is used for them all.

 5. During 2006 and 2007 Sun released Java as free and _____-source software, under the terms of the GNU General Public License (GPL). (1 mark)

 6. Which of the following statements is NOT true? (1 mark)
Java works on the windows platform only
It is one of the most popular programming languages in the world
It is easy to learn and simple to use
It is open-source and free
It is secure, fast and powerful
It has a huge community support (tens of millions of developers)

  All of the items on the list are true of Java

  No. 1 - Java actually works on multiple platforms incluing Windows, Mac, Linux etc

  No 4 - Java is not open source or free. It is proprietary software

  No 2 - Java is only used by older programmers and is no longer currnet

 7. To start to learn Java and write Java programs you need a way to _________ source code and turn it into an executable for the Java runtime. (1 mark)
The normal way to do this is to install the Java Development Kit.

 8. When we write Java code, that high level code is known as s_______ c________. (1 mark)

 9. The code we write (in Java) is _________ into byte code, which is .class. All operating systems (e.g windows, mac, linux) would all understand this code.

  developed

  maintained

  compiled

  binaried

 10. The JDK stands for Java Development kit and JDK is a set of software that is used to_____ Java based applications.
Note: Downloading the Java SE Development kit will include the JRE and everything else should be done for you on download.

  delete

  exceute

  maintain

  develop

 11. JRE (Java Runtime Environment) is an implementation of Java Virtual machine (JVM) that actually _______Java programs. It is responsible for the execution and running on operating systems.

  develops

  maintains

  executes

  malfunctions

 12. Netbeans and Eclipse, as well as Android Studio are all examples of very popular IDEs for writing Java programmes. What is an IDE? (1 mark)

  included detonated environment

  international dongle entity

  internal deviant entity

  integrated development environment

 13. You write the actual code for your programmes in a text editor. (In NetBeans/Eclipse, there's a special area for you to write code.) The code is called _______ code, and is saved with the file extension .java (1 mark)

  source

  machine

  assembly

  fast

 14. Once the file is saved, a programme called Javac is then used to turn the source code into Java Byte Code. This is known as __________(1 mark)

 15. After Javac has finished compiling the Java Byte Code, it creates a new file with the extension .class. Once the class file has been created, it can be run on the Java Virtual Machine

  FALSE

  TRUE

 16. Java is a general-purpose programming language that is class-based, _____-oriented, and designed to have as few implementation dependencies as possible (1 mark)

 17. It is intended to let application developers "write once, run anywhere" (WORA), meaning that compiled Java code can run on all platforms that support Java without the need for __________. (1 mark)
Note: Java applications are typically compiled to
 "bytecode" that can run on any Java virtual machine
 (JVM) regardless of the underlying computer architecture

  execution

  saving

  transmission

  recompilation

 18. Interesting fact - True or false? "Java was originally designed for interactive television, but it was too advanced for the digital cable television industry at the time" (1 mark)

  FALSE

  TRUE

 19. Interesting fact - True or false? " The language was initially called Oak after an oak tree that stood outside Gosling's office. Later the project went by the name Green and was finally renamed Java, from Java coffee" (1 mark)

  FALSE

  TRUE

 20. If you do not have Java installed on your computer, you can download it for free from oracle.com. (1 mark)
You can also simply download Eclipse from here:  www.eclipse.org/downloads

  TRUE

  FALSE