- 博客(9)
- 收藏
- 关注
原创 【java】报错 :void is an invalid type for the variable sumInt
问题 【Java】void is an invalid type for the variable sumInt 【Java】The method sumInt(int, int) is undefined for the type MethodTest02 翻译: void 是变量 sumInt 的无效类型 对于类型 MethodTest02,方法 sumInt(int, int) 是未定义的 原因 查看了这篇文章:原因参考 “ 在一个方法中定义了另一个方法,这在java中是不允许的。” 我在主方
2022-04-11 19:15:10
1333
原创 【Java】 java.util.scanner cannot be resolved to a type
day05 第一个 java.util.scanner cannot be resolved to a type Java编写键盘输入时出现: Multiple markers at this line - java.util.scanner cannot be resolved to a type - java.util.scannner cannot be resolved to a type 第一个问题是:没有引用包 解决:最上边添加import java.util.Scanne
2022-04-04 12:14:02
7005
3
原创 【C语言】练习题01
二组04 1、若定义了char ch[]={"abc\0def"}, *p=ch;则执行printf("%c",*p+4);语句的输出结果是() Adef B.d C.e D.0 解析: 先算*p *p=ch[0]=‘a’ ,*p+4=‘a’+4=e 【 ASCII码:97+4=101 a bcde】 区别于:*(p+4) 先算(p+4) , p=ch[0] , p+4=ch[4] =d 要对应: ch[0]—ch[1]—ch[2]—ch[3]–ch[4]—ch[5] a .
2022-03-23 13:16:00
1421
原创 【Git】Git上传代码到Gitee仓库步骤
新建文件夹 文件夹内新建文件 查看中打开文件拓展名和隐藏项目,然后右键单击空白处,选择Git Bash Here. 以下步骤参考git上传代码到gitee仓库步骤 输入:git config --global user.name "your_name" git config --global user.email "your_email" 初始化 、 添加远程地址 等等 按照指示完成后,是这个样子的。 Gitee显示提交成功 再次提交: 1、先添加文件 2、输入命.
2022-03-21 21:43:48
1974
原创 【Java】 在类 VarTest03 中找不到 main 方法, 请将 main 方法定义为: public static void main(String[] args) 否则 JavaFX
问题 在类 VarTest03 中找不到 main 方法, 请将 main 方法定义为: public static void main(String[] args) 否则 JavaFX 应用程序类必须扩展javafx.application.Application 发现问题 在Editplus中发现main拼写不正确,然后修改保存后再进行编译,仍然出现这个问题。 解决 修改保存代码之后,需要重新生成class文件。重新生成之后就好了。 ...
2022-03-19 16:18:47
453
原创 【JAVA】编译时错误:A JNI error has occurred, please check your installation and try again
1. 问题: 在DOS命令窗口编译时出现错误:A JNI error has occurred, please check your installation and try again 2. 解决: 搜到了几个方法,且已经尝试,都不行。 比如:(有可能是我没操作对) 我的 javac与java指令显示出的版本一致。 在path变量上操作后还不行。 我电脑还有了两个JDK ,卸载了一个后还不行。 我就想到了我的HelloWorld.class文件不是自主生成的,是我自己加的(看课不能走神啊)。 我的问题是"
2022-03-18 20:45:30
1576
原创 JAVA-定义两个重载的方法,分别求圆和长方形的面积。
定义两个重载的方法,分别求圆和长方形的面积。 1、定义两个求面积的重载方法,圆周率可以用Math.PI表示 2、在主方法中调用方法并将结果输出。 注意:当圆的半径为4.5,长方形长和宽分别为8和5时,可得到如效果图所示的结果 代码:` package com.homework1105; public class AreaDemo { //求圆形面积 public void roundS(double r1) { double s0; s0=r1r1Math.PI; System.out.prin
2020-11-05 22:56:13
10460
原创 5、给定一个数组,将数组中的元素向右移动 k 个位置,其中 k 是非负数。
#include <stdio.h> int main() { int k; printf(“please input the value of k:\n”); scanf("%d", &k); //输入k int ar[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; int ar...
2020-02-07 11:31:57
1011
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅