0% found this document useful (0 votes)
72 views1 page

Public Static Void Main (String Args ) What Is The Significance of The Words Public, Static and Void?

This document discusses key concepts in object oriented programming in Java. It defines object oriented programming as a programming approach centered around objects rather than functions. The document then discusses some key characteristics of OOP like encapsulation, inheritance, polymorphism. It also explains important Java concepts like classes, objects, methods, access modifiers etc. Finally, it provides examples of simple Java programs to print bio-data and other user information on the screen.

Uploaded by

Gopi Selvaraj
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)
72 views1 page

Public Static Void Main (String Args ) What Is The Significance of The Words Public, Static and Void?

This document discusses key concepts in object oriented programming in Java. It defines object oriented programming as a programming approach centered around objects rather than functions. The document then discusses some key characteristics of OOP like encapsulation, inheritance, polymorphism. It also explains important Java concepts like classes, objects, methods, access modifiers etc. Finally, it provides examples of simple Java programs to print bio-data and other user information on the screen.

Uploaded by

Gopi Selvaraj
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/ 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