How to write hello world different languages syntax

The learning curve - hello world

As a developer, you all must have worked on various programming languages and must have started with a simple "hello world" example. Though the message remains the same, every language has a different syntax (set of commands) to print it (with few exceptions where the command is the same for more than 1 language).

Listed below is the syntax of some common computer programming languages (chronologically), do leave a comment if we missed any language

Programming Language Command Syntax
ABAP WRITE WRITE 'hello world'.
ADA Put_Line Put_Line("hello world");
APPLESCRIPT display dialog display dialog "hello world"
ASP.NET Response.Write Response.Write("hello world");
BASIC PRINT PRINT "hello world"
BATCH @echo @echo hello world
C printf printf("hello world");
C++ std:cout << std:cout << "hello world";
C# Console.WriteLine Console.WriteLine("hello world");
D writeln writeln("hello world");
F# printfn printfn "hello world"
FORTRAN write write(*,*) 'hello world'
HTML hello world
JAVA System.out.println System.out.println("hello world");
JAVASCRIPT alert alert('hello world')
LOGO print print [hello world]
MATLAB disp disp('hello world')
OBJECTIVE-C NSLog NSLog("hello world");
PASCAL WriteLn WriteLn('hello world');
PERL print print "hello world";
PHP echo <?php echo 'hello world'; ?>
POWERSHELL 'hello world'
PYTHON print print "hello world"
RUBY puts puts "hello world"
SQL select select 'hello world'
SWIFT println println("hello world")
VISUAL BASIC MsgBox MsgBox "hello world"
VISUAL BASIC .NET Console.WriteLine Console.WriteLine("hello world")
VISUAL FOXPRO ? ? "hello world"
XSLT <xsl:text> <xsl:text>hello world

Try Out Code2care Dev Tools:


Android Java Linux Microsoft Google Python macOS Notepad++ Microsoft Teams CSS PHP SharePoint Html Linux C Programs Bootstrap jQuery Sublime Android Studio Facebook Eclipse WhatsApp News MySQL Json HowTos JavaScript FTP S3


Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and Software Developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include Learnings, Tutorials, Trouble-Shooting steps, Video Tutorials, Code Snippets, How Tos, Blogs, Articles, etc.
🎉 We are celebrating the 10th years of Code2care! Thank you for all your support! We hope we made a difference.
We strong support Gender Equality & Diversity.

We stand in solidarity with Ukraine - Make a donation to UNHCR -