What is PUBLIC STATIC VOID MAIN ( STRING[] Args ) in JAVA | Most Asked interview Question

preview_player
Показать описание
public static void main(String[] args) Java main method is the entry point of any java program. Its syntax is always public static void main(String[] args) . You can only change the name of String array argument, for example you can change args to myStringArgs .
Can we execute a java program without main method?
Yes, we can execute a java program without a main method by using a static block.

A static block in Java is a group of statements that gets executed only once when the class is loaded into the memory by ClassLoader, It is also known as a static initialization block, and it goes into the stack memory.

Top Core Java Interview Questions || Core Java Interview Questions and Answers [MOST ASKED]
Java Interview Questions and Answers | Java Tutorial | Java Online Training | Edureka
Top 10 Java Interview Questions | Java Interview Questions And Answers | Company Question |Viva|
Java Interview Questions And Answers | Public static void main | Java Programming Interview Questions And Answers
Java INTERVIEW Questions for Freshers | Public static void main #javainterview What is JAVA? | Java Interview Questions and Answers what is java language what is java language in computer what is java language and its features what is java language javatpoint what is java, Public static void main
Рекомендации по теме
Комментарии
Автор

I wish I had this easy questions at my job interviews

bvideoz
Автор

nice description, i failed an interview on this because I was so nervous even though I use it every day. You would be surprised, once you get to an interview everything you know goes blank.

mystrkillz
Автор

this is a main function which store value in string arraay format and array name is Args.
In which function
--public is access modifiers .you can read deeeply.
--static is modifiers which use we can use value without create object only class name.
--void is return type which is not any return value.
--main is function name and special function thats is called main function.

xctcqdz
Автор

LoL
I thought this is a meme about long lines of Java

mohabgamal
Автор

2011 i faced these questions in interview as I fresher

Bharat_ratna
Автор

Thank you for Useful information, ❤❤
I'm new subscriber

Missalvirakhan
Автор

Well it will be good for college viva.

anandkumaryadav
Автор

Keep uploading such type of shorts videos

sanjupole
Автор

Public is an access specifier right???

brm
Автор

Look how close he’s sitting to the desk and how far away she is, this man is an intimidating and dominating chad. Future CEO

Ricky-zcqm
Автор

Icse students studied this in class 9th

Meowerenchan
Автор

What does "public static void main" stand for? Nowadays the answer should be: for an outdated Java version. Just "main" is enough from Java 21 onwards.

AffiliationCode
Автор

can you pls explain why strings are immutable in java ?? with crystal clear explanation??

inikojeriko
Автор

Make more hard questions, and also make videos on spring boot. Everyday morning i should get notification for small video like this.

swarnavachakraborty
Автор

bhaii yo main hota he na Main nhe first letter of method in java is small

hqvdttt
Автор

Ye pow function kya hai
Maine toh sirf math.pow suna tha

Meowerenchan
Автор

this is literally the first thing you learn going into java

honu
Автор

2. What are your strengths and weaknesses?
3. Why Should I Hire You?
4. How do you feel about working nights and weekends?
5. Where do you see yourself in five years ?
6. How long would you expect to work for us if hired?
7. Do you have any questions for me?


TECHNICAL QUESTION (JAVA)
1. What is JAVA ?
2. What are the features of JAVA
3. What are the components of Java
4. Difference between JDK JVM and JRE
5. What is PUBLIC STATIC VOID MAIN ( STRING[] Args )
6. What is Package in JAVA
7. What is Primitive datatype in JAVA|
8. Why String is not Primitive
9.What is Literal and identifier in Java

DeveloperAdvocate
Автор

We can run the program with out any main method we can possible to get the output by using static block in the jdk version 1.6v until small problem is we will get runtime exception saying so such method : main
In 1.7v if the main method is available or not main method we will get runtime exception saying can you define main method as public static void main(String[] args) first JVM will checks where the main method is available are not

marnala.gopivinay
Автор

The parentheses are supposed to be around the method parameters lol

ChrithM