After learning Java basics via sololearn and from the oracle site. I would recommend Java cos it is, write once and run on all platforms.
I've run my code only on windows anyway.
NOTE
I'm not a Pro. Just an advanced learner.
So,
LETS GET STARTEDππππ.
Intro.π«π
Sun Microsystems created the Java language. Java is a case-sensitive programming language, like C++. Java is an Object Oriented Programming (OOP) structure. Java is a class based programming language.
Example with simple Java program
Open Notepad and type in this program, maintaining the upper and lower case, because Java is a cases sensitive programming language.
<code>
01. class Edidiong
02. {
03. public static void
04. {
05. System.out .print(β( "Welcome to Basic concept")")
06. }
07. }
</code>
After writing this code then save the program. When you save it you need to save the program with only the class name like:
Edidiong.java β//
.java is extension of Java file.π
After saving, compile and run the program so you need to open a βcmdβ. Click the Window button and type βcmdβ then hit Enter and open a βcmdβ then type the cmd command for going to the location where your Java program is, like mine is at βdesktopβ so I need to type:
cmd desktop
Then show desktop on your cmd then type the following to compile:
javac Edidiong.java
//javac stands for Java compile .π
When your Java program will be compiled successfully with no error then you have an auto-created a '.class' file.ππ
If the compile was successful then to run type:
Java Edidiong
The following is the output.ππ
" Welcome to basic concept "
ββIf you are confused, have questions or want to report something, DM me on Instagram. edidiong_udoh. Or, try visiting solo learn Java or tutorials point
No comments:
Post a Comment