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

Java Programming Concepts and Examples

The document outlines various Java programming concepts, including the meaning of keywords in the main method, operations of specific operators, and the use of the ternary operator. It also covers primitive data types, switch cases, temperature conversion, constructors, class and object concepts, type casting, and stack class implementation. Additionally, it discusses packages, variable types, and differences between standard output streams.
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)
5 views1 page

Java Programming Concepts and Examples

The document outlines various Java programming concepts, including the meaning of keywords in the main method, operations of specific operators, and the use of the ternary operator. It also covers primitive data types, switch cases, temperature conversion, constructors, class and object concepts, type casting, and stack class implementation. Additionally, it discusses packages, variable types, and differences between standard output streams.
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

1) Explain the meaning of each of the keyword in “public static void main”.

2) Discuss the operation of the following operators with example.


(i)<< (ii) >> (iii) >>> (iv) &
3) Demonstrate a java program to illustrate the use of ternary operator to
find the
greatest of three numbers.
4) Explain the various primitive data types used in [Link] suitable
examples.
5) Write a java program to show working of switch case.
6) Write a Java program to convert Celsius temperature to Fahrenheit.
7) Explain the use of “this” constructor to invoke current class method.
8) A class called Employee, which models an employee with an ID, name and
salary, is designed as shown in the following class diagram. The method
raiseSalary (percent) increases the salary by the given percentage. Develop
the Employee class and suitable main method for demonstration.
9) Brief type casting and illustrate with an example.
10) Explain constructors and types of constructors using a java program.
11) Explain concept of class, object with the help of a simple java program.
12) Develop a stack class to hold a maximum of 10 integers with suitable
methods. Develop a JAVA main method to illustrate Stack operations.
13) Explain different data types in Java.
14) How many types of packages are there in Java?
15) Differentiate between instance and local variables.
16) What is a static variable?
17) What is the difference between [Link], [Link], and [Link]?

You might also like