Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
October 25, 2021 08:51 pm GMT

Java Notes 1

I learned Java almost 6 years ago when I was in university, and since then I have used it sparingly at work. Today I am starting a series where I chronicle my journey re-learning Java, taking extensive notes and summarizing them to share with you all.

Here is my first note that will start the series:

Notes

  • Java is platform independent, meaning that you can write a program once, and as long as your host machine has JVM, it will just run - barring rare edge cases.

  • Every class (in Java everything is inside a class) is compiled into a separate Java bytecode file that has the same name as the class but ends with the .class extension instead of the .java extension.

  • Every Java program is a set of class definitions. To run a Java program, it must have a main method, which represents the entry point where the program starts when it is executed.

  • To compile a Java source-code file, you can use the javac command. And to run a Java class, you use the java command. More typically though, you will use some kind of IDE which has shortcuts and buttons to do this for you.

  • There can only be one public top-level class per .java file, and public top-level classes must have the same name as the source file.


Original Link: https://dev.to/icncsx/java-271p

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To