Programming Languages Comparison 2
Programming Languages Comparison 2
• Key Characteristics:
• - Dynamically typed
• - No explicit main function
• - Indentation-based syntax
2. Java
• Code:
• public class HelloWorld {
• public static void main(String[] args) {
• System.out.println("Hello, World!");
• }
• }
• Key Characteristics:
• - Statically typed
3. Dart
• Code:
• void main() {
• print('Hello, World!');
• }
• Key Characteristics:
• - Statically typed (optional type annotations)
• - Requires a main function
• - Commonly used for Flutter (mobile/web)
4. C
• Code:
• #include <stdio.h>
• int main() {
• printf("Hello, World!\n");
• return 0;
• }
• Key Characteristics:
5. C++
• Code:
• #include <iostream>
• int main() {
• std::cout << "Hello, World!" << std::endl;
• return 0;
• }
• Key Characteristics:
6. C#
• Code:
• using System;
• class Program {
• static void Main() {
• Console.WriteLine("Hello, World!");
• }
• }
Summary of Key Differences
• | Feature | Python | Java |
Dart |C | C++ | C# |
• |-------------------------|---------------|--------------|-
--------------|---------------|---------------|-------------
--|
• | **Typing** | Dynamic | Static
| Static | Static | Static | Static
|
• | **Syntax** | Simple | Verbose
| Simple | Verbose | Verbose |