Hexo代码高亮测试

  • Python:
print("Hello Python")
  • JavaScript:
console.log("Hello JavaScript");
  • Java:
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello Java");
}
}
  • C++:
#include <iostream>
using namespace std;
int main() {
cout << "Hello C++" << endl;
return 0;
}
  • C#:
using System;
class Program {
static void Main() {
Console.WriteLine("Hello C#");
}
}
  • Ruby:
puts "Hello Ruby"
  • Swift:
import Swift

print("Hello Swift")
  • Go:
package main
import "fmt"
func main() {
fmt.Println("Hello Go")
}
  • Rust:
fn main() {
println!("Hello Rust");
}
  • PHP:
<?php
echo "Hello PHP";
?>
  • TypeScript:
console.log("Hello TypeScript");
  • Kotlin:
fun main() {
println("Hello Kotlin")
}