Can we declare main () method as non static?
Answer / Kanishka Pangti
No, the main() method must be declared as static. This is because it serves as the entry point for a Java program and needs to be called before any non-static variables or methods can be used.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is type inference in java8?
what is interface in java? Explain
How many ways can we create singleton class?
how to java plateform independent?
How does hashset work in java?
What is a method ?
How does linkedlist work in java?
how you will prevent method overriding?
What is a byte string?
What is variable argument in java?
How can you eliminate duplicates?
Why do we need strings in java?