0% found this document useful (0 votes)
58 views

Java Ques by Sanjay Sir

This document contains questions about Java basics, data types, type casting, operators, decision making statements, loops, methods, arrays, global members, constructors, and object-oriented programming concepts in Java. Specifically, it includes questions about features of Java, platform independence, program structure, tokens, literals, primitive data types, variables, type casting, unary and ternary operators, decision making statements like if-else and switch, looping statements like for, while and do-while, methods, method overloading, recursion, arrays, static and non-static members, constructors, constructor overloading, encapsulation, inheritance, polymorphism, abstraction, interfaces, access specifiers and the main method signature.

Uploaded by

Ajay Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views

Java Ques by Sanjay Sir

This document contains questions about Java basics, data types, type casting, operators, decision making statements, loops, methods, arrays, global members, constructors, and object-oriented programming concepts in Java. Specifically, it includes questions about features of Java, platform independence, program structure, tokens, literals, primitive data types, variables, type casting, unary and ternary operators, decision making statements like if-else and switch, looping statements like for, while and do-while, methods, method overloading, recursion, arrays, static and non-static members, constructors, constructor overloading, encapsulation, inheritance, polymorphism, abstraction, interfaces, access specifiers and the main method signature.

Uploaded by

Ajay Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Basics

1. What is java? Features of java


2. Explain howjava is platform independent ?
3. Steps in java programming
4. Explain the structure of java programs
5. What is tokens ? explain with an example
6. What is literal

Datatypes

1. What is datatype ?explain the types


2. What is variable? Explain the types
3. List all primitive datatypes with size, default value

Type casting

1. What is type casting


2. Explain widening and narrowing
3. What is cast operator
4. What upcasting and downcasting
5. What is Class Cast Exception
6. What is instanceof keyword

Operators

1. What is operators? Mention the types


2. Mention all unary operators and explain each one
3. What is ternary operator explain the syntax

DMS

1. What is DMS
2. List all the types and explain the syntax
3. What is switch
4. What is break statement

Loops

1. What is looping statement?


2. What is the difference between all three loops
3. What is nested looping statement

Methods

1. What is method
2. What is method header
3. What is method signature
4. What is access specifiers and return type
5. What is method calling statement
6. What is recursive method
7. What is method overloading
8. What is compile polymorphism
9. What is the diff between R method and loop
10. What is var arg
11. What is command line arg
12. How to pass a value to a method
13. How to read a value from a method

Arrays

1. What is an array?explain the diff ways of declaring an array


2. What is ArrayIndexOutOfBoundsException
3. How to find the length of an array
4. What is the disadvantage of an array

Global members

1. What is global members


2. What is static global members
3. What is static variable
4. What is static method
5. What is static block
6. What is class loading operation
7. What is instance
8. What is instantiation
9. What is object how can we create an object
10. What is non static var
11. What is non static method
12. What is non static block
13. What is object loading operation
14. What is the diff between class and object loading operations

Constructors

1. What is constructor
2. What is constructor overloading
3. What is constructor chaining
4. What is constructor calling statement
5. Difference between method and constructors
6. Explain types of constructors
7. Explain diff ways of accessing static and non static members in both the context
8. What is the use of constructors

OOPs

1. What is encapsulation
2. What is inheritance
3. What is datahiding ?explain getters and setters method
4. What is package
5. What is access specifiers and explain each
6. What is super()?explain in details
7. What is polymorphism? Explain compile time and run time polymorphism
8. What is method overriding
9. What is method shadowing
10. Explain diamond problem
11. Explain each type of inheritance
12. What is extends
13. What is abstraction
14. What is abstract class?explain in brief
15. What is interface?
16. What is the difference between interface and abstract class
17. What is the use of implements
18. What is final
19. Explain method overriding with access specifiers
20. Why main method is like public static void main(String []args)

You might also like