Java在线运行

版本:

编辑于 2025-07-21 14:55 累计访问:4709
点击了解高性能代码运行API
运行结果
代码简介
代码仓库
极速运行
终端运行
图形+终端

                        
用户最新保存的代码
查看更多

作者 我是大神(lixiaoming)
编辑于:2025-07-21 14:55

public class HelloWorld { public static void main(String[] args) { String content = "733215970b5541e893dc891aa2ecdd2e_1663073537457_1.0_lixiaoming_1064_237141"; String hashToken = DigestUtils.md5DigestAsHex(content.getBytes()).toUpperCase(); System.out.println(hashToken); } }

提示:本站严禁涉政、违法等无关技术的内容
发送
搭载国产梦丘操作系统,支持安装软件,在线编程可视化开发软件,无需配置开发环境

点击购买 梦丘固件
  // 导入testPackage包下的Location类,才能使用该类 import testPackage.Location; /** * 测试类,调用testPackage包中Location类的方法 */ public class LocationTest { public static void main(String[] args) { // 1. 创建Location类的实例对象 Location loc = new Location(); // 2. 调用对象的disp()方法 loc.disp(); } } 5692

  public class HelloWorld { public static void main(String[] args) { String content = "733215970b5541e893dc891aa2ecdd2e_1663073537457_1.0_lixiaoming_1064_237141"; String hashToken = DigestUtils.md5DigestAsHex(content.getBytes()).toUpperCase(); System.out.println(hashToken); } } 4710

  class Main { public static void main(String[] args) { //JSRUN引擎2.0,支持多达30种语言在线运行,全仿真在线交互输入输出。 // System.out.println("Hello world! - java.jsrun.net "); Integer retryCount = 12; String str = "00000"; str += retryCount; System.out.println("str:"+ str.substring(str.length()-6,str.length()) ); } } 5634

  #include<iostream> using namespace std; class Base { public: virtual void fn() { cout <<"In Base Class\n";} }; class SubClass : public Base { public: virtual void fn(){ cout <<"In Sub Class\n"; } }; int main() { Base bc; Base *p; SubClass sc; p=&bc; p->fn(); p=&sc; p->fn(); } 5078

  # 自定义委托 委托也是一种类,所以声明时与其它类是平级的。 ``` public delegate double Calc(double x, double y); public class HelloWorld { public static void Main() { } } ``` delegate 告诉编译器正在声明委托,double 表示目标方法的返回值类型,圆括号里是目标方法的参数列表。 委托于所封装的方法必须类型兼容。 7075

  public class Main { public static void main(String[] args) { String formula = "2*x^2 + 3*x + 4"; Expression expression = new Expression(formula); System.out.println("Formula: " + formula); System.out.println("Parsed expression: " + expression.toString()); } } 3595

  func main(){ var name string var age int count,err:=fmt.Scanf("%s%d",&name,&age) fmt.Printf("name=%s,age=%d\n",name,age) fmt.Printf("输入了%d个参数\n",count) fmt.Print("错误提示信息:",err)} 6425

  #include<stdio.h> void main() { int x; printf(":"); scanf("%d",&x); if(x%2==0) printf("%d\n",x); else printf("%d\n",x); } 3888

  #include<stdio.h> int inc(int a){ return (++a); } int multi(int *a,int *b, int *c){ return (*c = *a++**b+++*a); } typedef int(*FUNC1)(int in); typedef int(*FUNC2)(int*,int*, int*); void show(FUNC2 fun,int arg1, int arg2) { FUNC1 p = &inc; int temp = p(arg1); fun(&temp,&arg1,&arg2); printf("%d\n",*arg2); } int main(){ int a; show(multi,9,&a); return 0; } 1460

  #include<stdio.h> /*引入头文件*/ int main(void) /*一个简单的C程序*/ { double x, y; /*定义个名字叫做number的变量*/ /*给number赋一个值*/ printf("Enter x(x>=0):\n"); /*调用printf()函数*/ scanf("%f\n",&x); if(x<=15){y=4*x/3; }else{y=2.5*x-10.5; } printf("y=f(%f)=%.2f\n", x, y); return 0; } 1843

  大作业第五题: 定义一个date类如下: class Date { public: void SetDate(int y,int m,int d); void IsLeapYear(); private: int year; int month; int day; }; 要求: (1)编写SetDate(int y,int m,int d)函数,实现对象中数据成员的设置; (2)编写IsLeapYear()判断该年是否是闰年。 871

移除 Class(Remove Class)
添加 Class(Add Class)
Class