Objectives :
* How to write Hello World in Java?
* How to write Hello World in C?
* How to write Hello World in PHP?
* How to write Hello World in C++?
* How to write Hello World in JavaScript?
* How to write Hello World in HTML?
* How to write Hello World in CSS?
* How to write Hello World in COBOL?
Java
[sourcecode language=”java”]
class HelloWorld
{
public static void main(String args[])
{
System.out.println(“Hello World!”);
}
}
[/sourcecode]
C
[sourcecode language=”c”]
#include
#include
void main()
{
clrscr();
printf(“Hello World!”);
getch();
}
[/sourcecode]
C++
[sourcecode language=”cpp”]
#include
#include
void main()
{
clrscr();
cout<getch();
}
[/sourcecode]
CSS
[sourcecode language=”css”]
body:before
{
content: “Hello World”;
}
[/sourcecode]
COBOL
[sourcecode language=”text”]
****************************
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO ENVIRONMENT DIVISION.
DATA DIVISION.
PROCEDURE DIVISION.
MAIN SECTION.
DISPLAY “Hello World!”
STOP RUN
****************************
[/sourcecode]
HTML
[sourcecode language=”html”]
<html>
<head>
<title>Hello World Example</title>
</head>
<body>
Hello World!
</body>
</html>
[/sourcecode]
JavaScript
[sourcecode language=”javascript”]
document.write("Hello World");
[/sourcecode]
PHP
[sourcecode language=”php”]
<!–?php echo ‘Hello World!’ ?–>
[/sourcecode]
Linux Shell Script
[sourcecode language=”text”]
echo "Hello World !"
[/sourcecode]
Enjoy coding!
Posted from WordPress for Android