What happens when a main method is declared as private?
Answers were Sorted based on User's Feedback
Answer / varsha vilas kalebag
IF MAIN METHOD IS DECLARED AS PRIVATE ,THEN WE CAN NOT
ACESSES THE PRVIATE MEMBERS IN ANOTHER CLASS
| Is This Answer Correct ? | 5 Yes | 43 No |
Answer / vani
Nothing Happen.
Code compiles properly and executes properly.
| Is This Answer Correct ? | 5 Yes | 76 No |
What is import java util arraylist?
What is object data type?
Is string is a keyword in java?
1.) if we use "private" in place of "public" in public static void main()... 2.) if we use "int" in place of "void".... 3.) can we ommit "static" keyword from that statement.... 4.) also can we give the command line arguments type as int type or float,etc.(.i.e (string args[]))
Real Time sample code for Encapsulation and Abstraction. where to use abstract and where to use specifies like public private.
What are Encapsulation, Polymorphism and Inheritance?
How do you join strings in java?
I have an HashMap object, which has with key and value pair. It has 10 keys and values in that object. Now the question is I want insert new key and value in middle or any where in that list but not at the end or at the top. Is it possible or not. If yes how can we achieve this one?
What exactly is methodology?
How java is platform independent?
41 Answers College School Exams Tests, Infosys, TCS,
What is lambda programming?
Is java type safe?