I am used to Android Studio and don't want to use other ide for Java development. How do I run pure java in Android Studio?
See this post.
In main menu-bar, go to File -> New -> New Module

Now scroll down to the bottom and select Java Library in the window that pops up

click next and set the package name in next screen

Click Finish. Android Studio will create Java Library Module for you. You are ready to code. All the short-cuts, key-mappings, auto-complete and scaffolding of IntelliJ platform is available for you to speed up your coding.
You can find your newly created Java Library in the Android scope in Project Navigator

You can add as many classes and packages you need.

Enter psvm (short for public static void main) and press enter to create your main method.
Once the method is created you will see green play button next to method and class to allow you to run your program.

Happy Coding!!!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With