0% found this document useful (0 votes)
57 views

Take Home Assignment 01

The document is an assignment from an Institute of Software Engineering for a Java fundamentals course. It contains 10 multiple choice questions related to Java concepts like the Java compiler, bytecode, and the main method signature. The student, R.K.Kavindya Sandamini Rajapaksha, answered all 10 questions correctly.

Uploaded by

sanjaya49
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views

Take Home Assignment 01

The document is an assignment from an Institute of Software Engineering for a Java fundamentals course. It contains 10 multiple choice questions related to Java concepts like the Java compiler, bytecode, and the main method signature. The student, R.K.Kavindya Sandamini Rajapaksha, answered all 10 questions correctly.

Uploaded by

sanjaya49
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

INSTITUTE OF SOFTWARE ENGINEERING

Comprehensive Master Java Developer (CMJD)

ASSIGNMENT NAME
Programming fundamentals
ASSIGNMENT NO - 01

NUMBER OF QUESTIONS: 10
NUMBER OF COMPLETED QUESTIONS: 10
NUMBER OF REMAINING QUESTIONS: 00

STUDENT NAME: R.K.Kavindya Sandamini Rajapaksha


NIC: 200076501193
BATCH NO: Physical-101
01.)

a) java

b) javac

c) .java

d) .class

e) bytecodes

02.)

By using compiler, we can convert high level language to low level language (source code to machine
language)

03.)
C Java
C is a compiles language Java is an interpreted language
C is a procedural programing language Java is an object-oriented language
C is a middle level language Java is a high-level language

04.)

Yes.

Java is platform-independent because it uses a virtual machine. In java, the main point here is that
the JVM depends on the operating system. Different OS have different JVMs so that Java can run in
any OS.

05.)

Java interpreter

Java is a platform-independent programming language. It implies that Java can be used on platforms
that support Java interpreters. It is the cause of Java's platform independence. The Java interpreter
transforms the Java bytecode (.class file) into operating system-friendly code.

O/S interpreter

A command interpreter allows the user to communicate with a program using text-based
commands. Modern graphical user interfaces and menu-driven interfaces, however, have taken the
place of numerous command interpreters.

06.)

The process of compiling a Java program entail transforming the programmer-readable language in
your program file (often referred to as source code) into bytecodes, which are instructions for the
Java Virtual Machine that are independent of the platform.
07.)

i.) From Terminal install open jdk


sudo apt-get install openjdk-7-jdk

ii.) Write a java program and save the file as filename.java

iii.) Now to compile use this command from the terminal


javac filename.java
If everything works well then, a new "filename.class" file should be created.

iv.) To run your program that you've just compiled type the command below in terminal:
java filename

08.)
There can be an error with Manoj’s JRE. A runtime environment is required for software programs to
give them access to memory and other system resources like program files and dependencies.

09.) First create java class as Example and then print “Hello Java in main function.

10.)

A. public static void main(String args[]){ } ✓


B. public void main(String args[]){} 
C. static void main(String args[]){} 
D. public static void main(String args){ } 
E. void main(String args[]){ } 
F. public static void main(){ } 
G. static public void main(String args[]){ } ✓
H. void main(String args){ } 
I. public static main(String args){ } 
J. public static void main(String []){ } 
K. static void public main(String args){ } 

You might also like