Below are examples of how to write Hello, World! in different programming languages. These examples help beginners understand syntax basics while exploring languages commonly used in software development, automation, data analysis, and cybersecurity learning.
If you are new to cybersecurity and want a clear learning path, start with this Cyber Security Roadmap 2026, which explains how programming fits into ethical hacking and defensive security careers.
1. Python
Python is one of the most popular languages for beginners, automation, data science, and ethical hacking due to its simple syntax and powerful libraries.
print("Hello, World!")
If Python is your starting point, this Beginner’s Guide to Python for Web Development will help you build strong fundamentals that are also useful in cybersecurity learning.
2. Java
Java is widely used in enterprise applications, Android development, and large-scale systems where stability and portability are important.
public class Main {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
3. C
C is a foundational programming language used for operating systems, embedded systems, and performance-critical software.
#include <stdio.h>
int main() {
printf("Hello, World!\n");
return 0;
}
4. C++
C++ extends C with object-oriented features and is commonly used in game development, system software, and high-performance applications.
#include <iostream>
int main() {
std::cout << "Hello, World!" << std::endl;
return 0;
}
5. JavaScript
JavaScript is the core language of the web, used for creating interactive websites and modern web applications.
console.log("Hello, World!");
To better understand JavaScript syntax and behavior before applying it to web security testing, refer to the JavaScript Quick Reference Guide.
6. Ruby
Ruby is known for its clean and readable syntax and is commonly used in web development and scripting.
puts "Hello, World!"
7. PHP
PHP is a server-side scripting language widely used to build dynamic websites and content management systems.
<?php
echo "Hello, World!";
?>
8. Swift
Swift is Apple’s primary language for iOS, macOS, and other Apple platform development.
print("Hello, World!")
9. Kotlin
Kotlin is widely used for Android app development and is fully interoperable with Java.
fun main() {
println("Hello, World!")
}
10. Go
Go (Golang) is designed for simplicity and performance, often used in cloud services, networking tools, and backend systems.
package main
import "fmt"
func main() {
fmt.Println("Hello, World!")
}
11. Rust
Rust focuses on memory safety and performance, making it popular for system programming and secure software development.
fn main() {
println!("Hello, World!");
}
12. TypeScript
TypeScript is a typed superset of JavaScript that helps developers build scalable and maintainable web applications.
console.log("Hello, World!");
13. Bash (Shell Script)
Bash scripting is commonly used in Linux environments for automation, system administration, and development workflows.
echo "Hello, World!"
14. SQL
SQL is used to interact with databases and is essential for managing, querying, and analyzing structured data.
SELECT 'Hello, World!';
If you are still unsure which language fits your long-term goals, this guide to choosing the right programming language in 2026 can help you decide based on career direction.
15. Dart
Dart is primarily used with the Flutter framework to build cross-platform mobile and web applications.
void main() {
print('Hello, World!');
}
16. R
R is mainly used for statistical computing, data analysis, and visualization in research and data science.
print("Hello, World!")
17. Perl
Perl is a powerful scripting language commonly used for text processing, system administration, and automation tasks.
print "Hello, World!\n";
18. Scala
Scala runs on the JVM and is used for functional and object-oriented programming, especially in big data systems.
object HelloWorld {
def main(args: Array[String]): Unit = {
println("Hello, World!")
}
}
19. Lua
Lua is a lightweight scripting language often embedded in games, applications, and automation tools.
print("Hello, World!")
20. Objective-C
Objective-C is an older Apple programming language used in legacy iOS and macOS applications.
#import <Foundation/Foundation.h>
int main(int argc, const char * argv[]) {
@autoreleasepool {
NSLog(@"Hello, World!");
}
return 0;
}
21. Haskell
Haskell is a purely functional programming language used in academic research and advanced software design.
main = putStrLn "Hello, World!"
22. MATLAB
MATLAB is used for numerical computing, engineering simulations, and scientific research.
disp('Hello, World!')
23. Pascal
Pascal is a structured programming language commonly used for teaching programming fundamentals.
program HelloWorld;
begin
writeln('Hello, World!');
end.
24. Fortran
Fortran is widely used in scientific computing, numerical analysis, and high-performance computing.
program HelloWorld
print *, "Hello, World!"
end program HelloWorld
25. Visual Basic .NET
VB.NET is used for building Windows applications and enterprise software on the .NET framework.
Module HelloWorld
Sub Main()
Console.WriteLine("Hello, World!")
End Sub
End Module
26. COBOL
COBOL is commonly used in banking, finance, and legacy enterprise systems.
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO-WORLD.
PROCEDURE DIVISION.
DISPLAY 'Hello, World!'.
STOP RUN.
27. Erlang
Erlang is designed for concurrent and fault-tolerant systems, often used in telecom and messaging platforms.
-module(hello).
-export([world/0]).
world() ->
io:format("Hello, World!~n").
28. Ada
Ada is used in safety-critical systems such as aerospace, defense, and transportation software.
with Ada.Text_IO; use Ada.Text_IO;
procedure Hello_World is
begin
Put_Line ("Hello, World!");
end Hello_World;
29. Groovy
Groovy is a JVM-based language commonly used for scripting, automation, and build tools like Gradle.
println 'Hello, World!'
30. Elixir
Elixir is built on the Erlang VM and is used for scalable, fault-tolerant applications.
IO.puts "Hello, World!"
31. Julia
Julia is designed for high-performance numerical and scientific computing.
println("Hello, World!")
32. TCL
TCL is commonly used for scripting, automation, and testing tools.
puts "Hello, World!"
33. Assembly (x86)
Assembly language is a low-level language used to understand how computers work at the hardware level.
section .data
hello db 'Hello, World!', 0
section .text
global _start
_start:
mov eax, 4
mov ebx, 1
mov ecx, hello
mov edx, 13
int 0x80
mov eax, 1
xor ebx, ebx
int 0x80
34. Prolog
Prolog is a logic programming language mainly used in artificial intelligence and rule-based systems.
:- initialization(main).
main :- write('Hello, World!'), nl.
35. F#
F# is a functional-first language used for data-heavy and analytical applications on .NET.
printfn "Hello, World!"
36. Lisp
Lisp is one of the oldest programming languages and is widely used in AI research and symbolic computing.
(write-line "Hello, World!")
37. ABAP
ABAP is used for developing applications on SAP enterprise systems.
WRITE 'Hello, World!'.
38. OCaml
OCaml is a functional programming language used in academic and industrial research.
print_endline "Hello, World!"
39. Scheme
Scheme is a minimalist Lisp dialect often used for teaching programming concepts.
(display "Hello, World!") (newline)
40. Verilog
Verilog is a hardware description language used to design and simulate digital circuits.
module HelloWorld;
initial begin
$display("Hello, World!");
$finish;
end
endmodule
41. Crystal
Crystal is a compiled language inspired by Ruby, offering high performance with readable syntax.
puts "Hello, World!"
42. Apex
Apex is used on the Salesforce platform to build cloud-based business applications.
System.debug('Hello, World!');
43. Nim
Nim is a statically typed language that compiles to C and focuses on performance and readability.
echo "Hello, World!"
44. Racket
Racket is a Lisp-based language designed for language creation and academic research.
#lang racket
(display "Hello, World!")
45. Smalltalk
Smalltalk is an object-oriented language known for its influence on modern programming concepts.
Transcript show: 'Hello, World!'.
46. VBA
VBA is used to automate tasks in Microsoft Office applications like Excel and Word.
Sub HelloWorld()
MsgBox "Hello, World!"
End Sub
47. Logo
Logo is an educational language commonly used to teach programming basics.
print [Hello, World!]
48. Batch
Batch scripting is used in Windows environments for basic automation and system tasks.
@echo off
echo Hello, World!
pause
49. Jinja
Jinja is a templating language commonly used with Python web frameworks.
{{ "Hello, World!" }}
50. Solidity
Solidity is used to write smart contracts for blockchain platforms like Ethereum.
pragma solidity ^0.8.0;
contract HelloWorld {
function sayHello() public pure returns (string memory) {
return "Hello, World!";
}
}
To validate your skills and improve job prospects, certifications play an important role. This list of top cybersecurity certifications explains which credentials align well with ethical hacking roles.
