Вы находитесь на странице: 1из 2

Question Bank: Java Programming (9113)

Class: TYIF (Semester – V)


Chapter No. 01 Introduction to Java
Review Questions:

1. Explain how you are going to compile and execute a Java source file?
2. Why Java is called as strictly object-oriented?
3. Which are the distinct features which made Java as a platform independent
language?
4. What will be the purpose of Java program to be compiled and interpreted?
5. Give the meaning of following terms:
a) Java virtual machine
b) bytecode
6. Describe the terms which makes a programming language as object-
oriented?
7. Differentiate between object-oriented programming and procedure oriented
programming.
8. List any five major C++ features which are removed in the Java.
9. Explain any two differences between >> and >>>.
10. How to declare symbolic constants in Java?
11. Explain the concept of manual and automatic type casting. Why it is
required in the programming?
12. Describe the scopes that a Java variable can have.
13. Illustrate the use of instanceOf and dot operator with example.
14. What are the naming convention rules for a Java identifier?
15. Describe different logical and relational operators with example.
16. What do you mean by operator precedence and association?
17. Differentiate between while and do-while loops.
18. Which are the type promotions rules used in the Java expression? Illustrate
with appropriate example.
19. Enlist different forms of creating the if-else structure.
20. Explain switch-case with the help of flow diagram.

Programming exercise:

1. Input two integer values from keyboard and swap their contents without
using any other temporary variable.
2. Read the price of an item (rupees) in float and display number of paise.
3. Convert the Celsius temperature input from keyboard into its Fahrenheit
equivalent using following formula:
C = (F – 32) /1.8
4. Accept the value of money in rupees and convert it into dollars.
5. Determine the sum of following series:
1 + 1/2 + 1/3 + …….. 1/n. take n as input
6. Print the Fibonacci series on the screen by taking n as input from
keyboard:
1 1 2 3 5 8 ……. n

-1-
7. Find squares of all the numbers from 1 to n.
8. Accept a number as input and find its sum of digits.
9. Input a number and print it in reverse order.
10. Input a long number from keyboard and count total number of even digits
in it.
11. Find the number of and sum of all the integers greater than 100 and less
than 200 that are divisible by 7.
12. Accept marks of 10 different students from keyboard and analyze it. That
is, count total first, second and pass class students.
13. Making the use of continue statement find whether the entered number is
prime or not?
14. Count how many perfect square numbers are also perfect cube numbers
from 1 to 1000.
15. Determine whether the entered number is palindrome or not? (A
palindrome number is read same from both front and back sides such as
56365, 812218, 121 etc.)
16. Print following output using for loops:
*
**
***
****
17. Count how many perfect square numbers are palindrome numbers from 1
to 10000.
18. Input the clock time and find the angle made between the ticks of the
analog clock.
19. Accept a number from keyboard and find its roman and binary equivalent.
20. Find all the natural Armstrong numbers For example: 153 is an Armstrong
number satisfies this property: 153 = 13 + 53 + 33.

-2-

Вам также может понравиться