CuriousTab
Search
CuriousTab
Home
Aptitude
Computer
C Programming
C# Programming
C++ Programming
Database
Java Programming
Networking
Engineering
Biochemical Engineering
Biochemistry
Biotechnology
Chemical Engineering
Civil Engineering
Computer Science
Digital Electronics
Electrical Engineering
Electronics
Electronics and Communication Engineering
Mechanical Engineering
Microbiology
Technical Drawing
GK
Current Affairs
General Knowledge
Reasoning
Data Interpretation
Logical Reasoning
Non Verbal Reasoning
Verbal Ability
Verbal Reasoning
Exams
AIEEE
Bank Exams
CAT
GATE
IIT JEE
TOEFL
Jobs
Analyst
Bank PO
Database Administrator
IT Trainer
Network Engineer
Project Manager
Software Architect
Discussion
Home
‣
Interview
‣
Technology
Comments
Question
What is the argument of main() method?
Correct Answer
main() method accepts an array of String object as arguement
Technology problems
Search Results
1. What is the return type of the main() method?
Show Answer
Scratch Pad
Discuss
Correct Answer: Main() method doesn't return anything hence declared void
2. Why is the main() method declared static?
Show Answer
Scratch Pad
Discuss
Correct Answer: main() method is called by the JVM even before the instantiation of the class, hence it is declared as static
3. Are arrays primitive data types?
Show Answer
Scratch Pad
Discuss
Correct Answer: In Java, Arrays are objects
4. Does Java support multiple inheritance?
Show Answer
Scratch Pad
Discuss
Correct Answer: Java doesn't support multiple inheritance
5. What are instance variables?
Show Answer
Scratch Pad
Discuss
Correct Answer: Instance variables are those which are defined at the class level Instance variables need not be initialized before using them as they are automatically initialized to their default values
6. Can a main() method be declared final?
Show Answer
Scratch Pad
Discuss
Correct Answer: Yes Any inheriting class will not be able to have it's own default main() method
7. Does the order of public and static declaration matter in main() method?
Show Answer
Scratch Pad
Discuss
Correct Answer: No It doesn't matter but void should always come before main()
8. Can a source file contain more than one class declaration?
Show Answer
Scratch Pad
Discuss
Correct Answer: Yes a single source file can contain any number of Class declarations but only one of the class can be declared as public
9. Which package is imported by default?
Show Answer
Scratch Pad
Discuss
Correct Answer: javalang package is imported by default even without a package declaration
10. Can a class be declared as protected?
Show Answer
Scratch Pad
Discuss
Correct Answer: A class can't be declared as protected only methods can be declared as protected
Comments
There are no comments.
Enter a new Comment
Save
More in Interview:
Accounting and Finance
Administrative Assistant
Advertising and Media
Call Center
Common Interview
Competency Interview
Customer Service
Design and Fashion
Finance
Hospitality
Human Resources
Law
Leadership and Management
Manufacturing
Marketing and Sales
Medical and Health Care
Medical Assistant
Retail
Technology