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

Java Mock Question

Uploaded by

K AJITH 4003
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Java Mock Question

Uploaded by

K AJITH 4003
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

BASIC STRUCTURE OF JAVA PROGRAM

1.Can we write a class without the main method ?


2.Explain about class members ?
3.What is the syntax to create a class block ?
4.Why do we need the main method ?
5.Explain the statements used to print the data ?

TOKENS

1.What is tokens and how many types are there ?


2.Explain about keywords ?
3.What is an identifier ?
4.Explain about rules of identifiers ?
5.Explain about convention of identifiers ?
6.What is the difference between rules and conventions of an identifier ?
7.What is primitive value ?
8.What is non-primitive value ?
9.What is character literal ?
10.What is boolean literals ?
11.What is String Literals ?

VARIABLES AND DATATYPES

1.What is Variable?
2.Based on the type how many types of variables are there? And list the types
3.What is Primitive Variable? And What is the syntax to create Primitive Variable?
4.What is Non Primitive Variable (Reference variable)? And What is the syntax to
create
Non Primitive Variable?
5.What is Datatype? How many types are there?
6.What is primitive data type? How many types are there? And list all the primitive
data types
7.What is non-primitive data type? How many types are there? And list some non
primitive
data types
8.In java Whether the class name is a non-primitive datatype?
9.What is Local Area? In local area which variables can we able to create ?
10.What is Global Area? In Global area which variables can we able to create ?
11.Based on the scope how many types of variables are there? And list the types
12.What is local variable? And explain about characteristics of local variable.

OPERATORS

1.What is typecasting and how many types of typecasting are there?


2.What is primitive typecasting and which are the types of primitive typecasting?
3.Expalin about widening? Give any one example.
4.Explain about narrowing? Give any one example.
5.Explain about typecast operator
6.What is the difference between Typecasting and Type conversion
7.Explain about operators?
8.Based on the operands how many types of operators are there?
9.Based on the task how many types of operators are there?
10.What is operand and what is expression?
11.Explain about Arithmetic operators.
12.Explain about Assignment operators.
13.Explain about Relational Operators
14.Explain about conditional Operator
15.Explain about logical Operators
16.Explain about increment and Decrement Operator

CONTROL FLOW STATEMENTS

1.What is control flow statements? And how many types are there?
2.What is decision making statements? And how many types are there?
3.Explain about if statement and give any one example
4.Explain about if else statement and give any one example ?
5.Explain about if else if statement and give any one example ?
6.Explain about switch statement and give any one example
7. What is break? Whether break statement is optional or mandatory?
8.Can we able to write duplicate cases in switch statement?
9.What is looping statements? And how many types are there?
10.Explain about while loop and Give one example for while loop
11. Explain about do while loop and Give one example for do while loop
12. What is the difference between while loop and do while loop?
13.Explain working flow for loop

METHODS

1.What is method and what is the syntax to create a method


2.is Access Modifiers And Modifiers are Mandatory in Methods.
3.What is Access Modifiers and Explain their types
4.What is Modifiers and which are the different types of modifiers we have?
5.What is Return Type And What we can able to Write in the position of return Type
6.Explain about Method Terminologies (Method Signature, Method Declaration and
Method definition)
7.Types of Methods Based On the Arguments
8.How to call a method?
9. What do you mean by calling method and Called Method
10.What process will Happen When The Method is Called
11.is Their any keyword to terminate the Execution of the method
and Transfer back the control to the caller
12.Can we call void Method Inside Print Statements
13.which keyword is used to return the Promised value in return Type of Method
14.What is Actual Arguments
15.What is Formal Arguments
16.Who will call Main Method
17.Execution starts And End in which Method?
18.Is Main Method Mandatory, what Happens When Main Method is Not Their and if
Programmer try to Compile and Run?
19.Can a programmer use string to return in return Type
20.What is The Convention for writing a method
21.is Return Type Mandatory
22.Can we have a method inside a method
23.What is dynamic read?
24.Explain the steps to read the data from the user?
25.In which package Scanner class is available?

You might also like