摘要:
public class variable_test05 { public static void main(String[] args) { int number=123; //得到个位数 int gewei=number %10; //得到十位数 int shiwei=number /10%10 阅读全文
posted @ 2022-07-28 19:57
NiceTwocu
阅读(293)
评论(0)
推荐(0)
摘要:
/* 变量使用的注意事项 1、同一个范围即一个中括号内,变量名不能重复 2、变量为未赋值不能使用 3、定义long类型,数据后面加L 4、定义float类型,数据后面加f * */ public class variable_test03 { public static void main(Stri 阅读全文
posted @ 2022-07-28 19:56
NiceTwocu
阅读(36)
评论(0)
推荐(0)
摘要:
public class variable_test04 { public static void main(String[] args) { int a=6; int b=4; System.out.println(a*b);//24 System.out.println(a/b);//1.5 S 阅读全文
posted @ 2022-07-28 19:56
NiceTwocu
阅读(18)
评论(0)
推荐(0)
摘要:
public class variable_test02 { public static void main(String[] args) { // 定义变量 String name="风清扬"; int age=18; char gender='男'; double temperature=36. 阅读全文
posted @ 2022-07-28 19:55
NiceTwocu
阅读(39)
评论(0)
推荐(0)
摘要:
import com.sun.scenario.effect.impl.sw.java.JSWBlend_SRC_OUTPeer; import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput; import com.sun.xml.interna 阅读全文
posted @ 2022-07-28 19:54
NiceTwocu
阅读(28)
评论(0)
推荐(0)
摘要:
```java public class variable_test01 { public static void main(String[] args) { System.out.println(); //定义秒杀价变量 double price =3599.00; //定义颜色变量 String 阅读全文
posted @ 2022-07-28 19:54
NiceTwocu
阅读(981)
评论(0)
推荐(0)
摘要:
public class study_day1 { public static void main(String[] args) { //字符串子面变量 System.out.println("HelloWorld"); System.out.println("黑马程序员"); //整数字面变量 S 阅读全文
posted @ 2022-07-28 19:53
NiceTwocu
阅读(48)
评论(0)
推荐(0)
摘要:
基础语法 package com.itheima;//包名 import java.util.Arrays; public class HelloWorld { //定义一个类 public static void main(String[] args) {//定义一个main函数 System.o 阅读全文
posted @ 2022-07-28 19:52
NiceTwocu
阅读(29)
评论(0)
推荐(0)
摘要:
package com.company; public class Data02 { public static void main(String[] args) { System.out.println(1024);//这是一个整数,默认就是Int类型 System.out.println(3.4 阅读全文
posted @ 2022-07-28 19:52
NiceTwocu
阅读(27)
评论(0)
推荐(0)

浙公网安备 33010602011771号