# java-leetcode **Repository Path**: jvvtao/java-leetcode ## Basic Information - **Project Name**: java-leetcode - **Description**: LeetCode 每日一练 - **Primary Language**: Unknown - **License**: GPL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 1 - **Created**: 2021-07-12 - **Last Updated**: 2021-07-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: LeetCode ## README # LeetCode 每日一练 #### 介绍 在学习 LeetCode 题目经常需要本地写 main 方法并且新建对象调用算法方法,此过程为机械操作,没有多大意义。
正好本人又学了一遍 JVM 类加载机制以及双亲委派模型,有感此间设计精妙无比,想将此设计用于实践,于是便有了 LCExec 类。 #### LCExec.java ``` javac LCExec.java ``` 命令行操作很酷呀!有没有~ #### Leetcodexxx.java 算法类 ``` javac Leetcodexxx.java ``` #### 运行 ``` java LCExec 类名.方法名 [[参数类型] [参数值] ...] ``` - 参数类型与参数值必须成对出现 - 参数类型目前只支持 int(int)、int数组(intarray)、字段串(string)、字符串数组(stringarray) #### 运行试例 ``` java LCExec Leetcodexxx.test int 1 ``` 类名以 'Leetcode' 开始,可以省略 ``` java LCExec xxx.test int 1 ``` ``` java LCExec xxx.test intarray 1,2,3 string hello ``` ``` java LCExec xxx.test stringarray a,b,c,d int 4 ``` int多维数组(最多支持3维) ``` java LCExec xxx.test intarray:2:2:2 1,2,3,4,5,6 ```