In this post under Java, Language, I will introduce you to changes done to our age old main method as part of Java 25. Pre Java 25, if we have to write our main method, we used to mark it public make the return value of the method “void” mark it static provide String array…… Continue reading New changes to age old main method
Category: Language
Instance Main and Non-Instance Main method in one class example
In this post under Java language, I will show with example how Java runs a program which has two main methods. Here two main methods means one traditional public static void main method as shown below public static void main(String[] args) { } and another being the new main method as shown below void main()…… Continue reading Instance Main and Non-Instance Main method in one class example
Instance Main method example
In this post under Java language, I will introduce you to new feature added to Java called “Instance Main Method”. This feature was added in Java version 25. Pre Java 25, if we have to write class with “main” method, we used to mark it as public and static as shown below. You also need…… Continue reading Instance Main method example