What is the need to declare main() method as static in Java?
Answer Posted / paletipatisrinu
public static void main(String k[]) here
public:The main method will be called by jvm.so jvm is
located some other place so invoke our main() should be public
static:before object is creation calling main() method so
the main() method will be called by using static
void:so jvm does not expected any return value
main():its method name
String[]:argument type is String
| Is This Answer Correct ? | 17 Yes | 6 No |
Post New Answer View All Answers
Who created eclipse?
What is transactional in java?
What is dao in java?
How long can a lambda function run?
Which framework is best for rest api java?
What is the difference between Logical Parallelism and Physical Parallelism?
What is orm in java?
What is a cookie in java?
What is predicate in lambda expression?
How do I install java on windows?
What are the benefits of a jar file?
Can the main method be declared final?
What is a pojo class in java?
there are 67 seats in train . there are only 5 seats in a row and in last row there are only 2 seats. One person can reseve only 5 seat at a time. If person reserving seat , the care is atken that he may get all in row. if seats are not available in row then the arrangement is so that person group get nearby seats. the following class is given public class seat { char name; int seat; boolean isSeatempty } 1.Draw require class digram and object diagram. 2.Write function seatallot(int noofperson) to allocate seat with seat nuber printed for the each name.
Which interceptor is responsible for setting action javabean properties?