






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







โ (^) A computer program is a list of instructions that tells a computer what to do. โ (^) Everything a computer does is done by using a computer program. โ (^) A computer program is written in a programming language like C, C++, Java, etc.
โ (^) We need a way to display something on the screen. Right? โ (^) The command used to print some text on the screen is: โ (^) System.out.print โ (^) Note that Java is a case sensitive language, meaning that uppercase letters and lowercase letters are different for it. โ (^) So, capital โSโ must be capital or else the computer will not be able to understand the command.
โ (^) Now, you must be wondering, how do we tell the computer to print some specific text on the screen? โ (^) So, to achieve this, you need open-close curved brackets just after the command, and put your text inside them โ (^) Something like this: โ (^) System.out.print(Hello World)
โ (^) In Java, we put the semicolon after every command. โ (^) Just like we use the full stop after every statement in English, we use the semicolon to end every command in Java. โ (^) So the final command will look something like this: โ (^) System.out.print("Hello World"); โ (^) put the semicolon after every command. โ (^) Now RUN the program to get output.