class test
{
private static void main(String []adsf)
{
}
}
explain me that the above code is error or exception
Answer Posted / xavier
This will throw a runtime error stating main method not public
This is because main method is the starting point of program
execution and it should be accessible by JVM
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What kind of variables can a class consist?
What do you mean by exception handling in Java?
What is += mean in java?
Write a function for palindrome and factorial and explain?
How thread scheduler schedule the task?
What is a platform?
Give example to differentiate between call by value and call by reference.
Which java collection does not allow null?
Does java return by reference?
What are the drawbacks for singleton class?
Can we assign integer value to char in java?
What is a percentage sign called?
How are destructors defined in java?
What is vector?
What is anagram in java?