摘要: public class Arr { public static void main(String[] args) { // 定义一个数组 int[] arr = new int[5]; for(int i = 0; i < arr.length; i++){ arr[i] = 12; } // 打 阅读全文
posted @ 2021-02-12 18:44 火鸡的呐喊 阅读(82) 评论(0) 推荐(0) 编辑
摘要: public class Demo2 { // 可变参数的传参 public static void main(String[] args) { Demo2 demo2 = new Demo2(); demo2.printString("l","o","v","e"); // l o v } pub 阅读全文
posted @ 2021-02-12 12:45 火鸡的呐喊 阅读(39) 评论(0) 推荐(0) 编辑
摘要: // 命令行java命令执行的时候这里会报错的,所以需要去com的上一级的目录去java com.mixi.wc.Demo 这样去执行,命令如下 // java com.moxi.wc.Demo aa bb package com.moxi.wc; /** * @author Mr.Wang * @ 阅读全文
posted @ 2021-02-12 12:31 火鸡的呐喊 阅读(91) 评论(0) 推荐(0) 编辑