You are on page 1of 1

7/13/2020 Introduction to Object Oriented Programming Concepts | Happy Compiler

c) It highlights the syntax that makes the program easier to read.


d) It allows compilation, execution, editing of programs all in one place.
13. Name a package that is invoked by default.
java.lang package.
14. What are the points to be taken care while naming a class in a Java program?
The class name must not be a keyword. It should be meaningful and relevant to the program.
It should follow the naming rules that are used with identifiers.
15. Java is a case-sensitive language. Explain.
Java is a case-sensitive language because while naming identifiers, the uppercase and
lowercase characters are treated differently. For example, int num = 5; and int Num = 7; both
the variables are different.
16. The main() function in a Java program is declared as:
public static void main(String args[])
What is the significance of the words public, static and void?
The keyword public makes the function main() accessible from anywhere. The static keyword
makes it possible to execute main() without the need of the object of the class in which it is
defined. The void keyword states that main() doesn’t return any value.
17. What does the term compilation mean?
Compilation is the process of converting a high-level language program into a low-level
language program at once.
18. Java programs uses compiler as well as an interpreter. Explain.
Java uses a compiler to generate an intermediate code called bytecode which becomes
platform independent. Then Java uses an interpreter to execute this bytecode.
19. Design a program in Java to display the following information on the output screen:
Name:
Class:
Roll No.:
Subject:
School:

class Info{
public static void main(String args[]){
System.out.println("Name: Peter Parker");
System.out.println("Class: IX");
System.out.println("Roll No. 18");
System.out.println("Subject: Computer Application");
System.out.println("School: My School");
}
}

20. You have to display your bio-data on the output screen. Write a program in Java to
perform the task in the given format:
Name:
Father’s Name:

https://www.happycompiler.com/oop/ 5/12

You might also like