分别用Python,Java,Golang,PHP实现Hello World,哪个更适合你

Python语言(只要一行,不带分号):

 
  1. print("Hello World")

 

Java语言(需要五行,要带分号):

 
  1. public class test{
  2. public static void main(String[] args) {
  3. System.out.println("Hello World");
  4. }
  5. }

 

Golang语言(五行,不带分号):

 
  1. package main
  2.  
  3. import "fmt"
  4.  
  5. func main() {
  6. fmt.Println("Hello World")
  7. }

 

PHP语言(三行,带分号):

 
  1. <?php
  2. echo "Hello World";
  3. ?>

 

相关文章:

  • 2021-08-27
  • 2021-07-29
  • 2021-12-25
  • 2022-12-23
  • 2021-08-08
  • 2021-11-03
  • 2021-08-31
猜你喜欢
  • 2021-08-22
  • 2021-07-08
  • 2021-08-10
  • 2021-07-15
  • 2021-05-02
  • 2021-10-14
  • 2021-05-22
相关资源
相似解决方案