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

Section A (40 Marks) : Answer All The Questions (2 Marks Each Q 1 To 16)

This document contains questions for a Java programming exam with sections A and B. Section A contains 18 multiple choice questions worth 2 marks each (total 40 marks) related to Java concepts like architecture, object oriented programming, the Java Virtual Machine, variables, operators, data types, identifiers, control structures and basic math expressions. Section B contains 1 question worth 15 marks to write a Java program to calculate employee gross and net pay based on basic salary, deductions and allowances.

Uploaded by

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

Section A (40 Marks) : Answer All The Questions (2 Marks Each Q 1 To 16)

This document contains questions for a Java programming exam with sections A and B. Section A contains 18 multiple choice questions worth 2 marks each (total 40 marks) related to Java concepts like architecture, object oriented programming, the Java Virtual Machine, variables, operators, data types, identifiers, control structures and basic math expressions. Section B contains 1 question worth 15 marks to write a Java program to calculate employee gross and net pay based on basic salary, deductions and allowances.

Uploaded by

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

SECTION A (40 MARKS)

Answer all the questions


1)
2)
3)
4)
5)
6)
7)
8)
9)
10)
11)
12)
13)

14)
15)

16)
17)

[ 2 marks each Q 1 to 16].

Explain java is architecture neutral.


Explain polymorphism
What is object oriented language?
What do you understand by JVM?
Mention a few rules for naming an identifier?
What are keywords and identifiers?
Mention the different datatypes.
What is dynamic initialization of a variable? Give an example.
What is type conversion? Give an example for each type.
What is operator associativity?
Write the ASCII value range for A to Z and a to z.
What is ternary operator? Write the syntax.
Evaluate the following and write the output.
Int a=15,b=20,c=30;
Int d=++a + b++ - --c;
System.out.println(Output is +d);
System.out.println(a+ \t +b +\t +z);
Identify which of the following are valid identifier. Give reason if invalid.
a) int
b) sum c) 5abc d) xy$z$e
Write the output for the following
Float i=10.5;
Float=n= i++ % 10;
System.out.println(n);
System.out.println(i)
What does scanner class nextInt( ) and nextLine( ) do?
What are the differences between if and switch statements?

18) write the java expression for the given mathematical expression
a) (a+b)
b) a/b2 c) (a+b)*(a-b) d) 3x2+2/5

[ 4 marks ]
[ 4 marks ]

SECTION B
Answer all the questions [ 15 marks each ]
1)

Write a java program to input employee name and basic salary and calculate the gross pay and net pay based on the following.

DA = 40% of basic, HRA = 10% of basic, PF = 8.33% of basic, Gross = Basic + HRA+ DA, Net = Gross PF.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy