The document outlines various topics related to Java programming, including differences between C++ and Java, Java buzzwords, variable types, data types hierarchy, flow control, object initialization, and the use of keywords like 'this', 'final', and 'static'. It also discusses inheritance, exception handling, and provides multiple Java programming examples demonstrating concepts such as encapsulation, abstraction, polymorphism, and method overloading and overriding. Additionally, it includes programs for checking Armstrong numbers, factorial calculations, and demonstrating class and object creation.
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
4 views
Model Qns for java
The document outlines various topics related to Java programming, including differences between C++ and Java, Java buzzwords, variable types, data types hierarchy, flow control, object initialization, and the use of keywords like 'this', 'final', and 'static'. It also discusses inheritance, exception handling, and provides multiple Java programming examples demonstrating concepts such as encapsulation, abstraction, polymorphism, and method overloading and overriding. Additionally, it includes programs for checking Armstrong numbers, factorial calculations, and demonstrating class and object creation.
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1
1. Differentiate C++ and JAVA?
2. Discuss about Java Buzzwords
3. What are the different types of variables available in Java, Give an example for each? 4. Draw the hierarchy of Java Data Types, mention example and the default size for each one. 5. Discuss about java Flow control and conditional statements with example? 6. Explain the different ways to initialize object with an example code? 7. How to avoid overriding, Give an example code? 8. Differentiate overloading and overriding 9. Classify inheritance, Give sample code for each case? 10. Implement different types of constructor using an example? 11. Show the usage of this, final and static keyword with an example code? 12. What are the different uses of super keyword, explain with an example code? 13. Differentiate Java nested and inner class in Java, Give an example code? 14. Discuss about the different types of exceptions and the ways for handling that? 15. How to create your own exception, Give an example?
Programs
1. Java Program to Check Armstrong Number between Two Integers
2. Java Program to Check whether the input number is a Neon Number 3. Java Program to Check whether input character is vowel or consonant 4. Java Program to Find Factorial of a number 5. Java Program to Find Even Sum of Fibonacci Series Till number N 6. Java Program to Create a Class and Object 7. Java Program to Create Abstract Class 8. Java Program to Create Singleton Class 9. Java Program to Create an Interface 10. Java Program to Show Encapsulation in Class 11. Java Program to Show Inheritance in Class 12. Java Program to Show Abstraction in Class 13. Java Program to Show Data Hiding in Class 14. Java Program to Show Polymorphism in Class 15. Java Program to Show Overloading of Methods in Class 16. Java Program to Show Overriding of Methods in Classes 17. Java Program to Show Use of Super Keyword in Class 18. Java Program to Show Use of This Keyword in Class 19. Java Program to Show Usage of Static keyword in Class 20. Java Program to Show Usage of Access Modifier 21. Demonstrate constructor overloading with a program