Professional Documents
Culture Documents
i) To convert string objects to primitive int. ii) To convert integer object to string object.
5.Write a program to find largest between two numbers using ‘?:’ operator.
6.Define class Student with suitable data members create two objects using two different
constructors of the class.
9. Write a program to divide any positive even integer by 2 using bitwise shift operator.
10. Enlist types of stream classes and describe methods for reading and writing data for
each type.
12. Write a program to define two threads for displaying even and odd numbers respectively with a
delay of 500 ms after each number.
13. Write a program to define class Employee with members as id and salary. Accept data for five
employees and display details of employees getting highest salary.
16. Write any two differences between method overloading and method overriding.
17. Differentiate between String and StringBuffer class
18. Design a screen in Java which accepts text in text box. If the left mouse is clicked, convert
the text to uppercase and if the right button is clicked, convert it to lower case
19. Explain about any two Layout Managers with example programs
21. "Threads can be given priorities" - Support this statement with suitable example
22. "Java does not support operator loading" - Support this statement with appropriate reasoning.
23. b) Write a Java program to find the area and perimeter of square and circle using interface.