/** * 逻辑运算符测试 * @author aflft * */ public class TestOperator03 { public static void main(String[] args) { boolean b1=true;
/** * 关系运算符测试 * @author aflft * */ public class TestOperator02 { public static void main(String[] args) { int a = 3;
/** * 测试算术运算符 * @author aflft * */ public class TestOperator01 { public static void main(String[] args) { byte a=1;
/** * 测试字符类型和布尔类型 * @author aflft * */ public class TestPrimitveDateType3 { public static void main(String[] args) { char a = 'T'
浮点数据类型学习测试 TestPrimitiveDateType2.java /** * 测试浮点型 * @author jinhao * */ import java.math.*; public class TestPrimitiveDateType2 { public static v
基本数据类型测试文件 TestPrimitveDateType.java源码: /** * 测试基本数据类型 * @author jinhao * */ public class TestPrimitiveDateType { public static void main(String[] args) {
常量测试文件 TestConstant.java源码: /** * 常量测试 * @author jinhao * */ public class TestConstant { public static void main(String[] arge) { 类别:JAVA学习笔记 | 评论(0) | 浏览(553) | 2019-12-12 aflfte2011 BallGame桌球源码 实现ball小球的直线来回运动。 BallGame.java源码: import java.awt.*; import javax.swing.*; public class BallGame extends JFrame { Imag 类别:JAVA学习笔记 | 评论(0) | 浏览(615) | 2019-12-4 aflfte2011 windows 10配置JAVA SE环境方法 首先我们需要下载java开发工具包JDK,下载地址:http://www.oracle.com/technetwork/java/javase/downloads/index.html,下载完成后按照提示安装完成, 环境变量配置: 打开环境变量,在系统变量中找到PATH项,添加上JAVA安装目录bin目录;然在系统变量 类别:网站程序 | 评论(0) | 浏览(765) | 2019-12-3 aflfte2011 PHP保留两位小数的方法 $num = 10.4567; //第一种:利用round()对浮点数进行四舍五入 echo round($num,2); //10.46 //第二种:利用sprintf格式化字符串 $format_num = sprintf("%.2f",$num);   类别:网站程序 | 评论(0) | 浏览(784) | «... 15 16 17 18 19 20 21
实现ball小球的直线来回运动。 BallGame.java源码: import java.awt.*; import javax.swing.*; public class BallGame extends JFrame { Imag
首先我们需要下载java开发工具包JDK,下载地址:http://www.oracle.com/technetwork/java/javase/downloads/index.html,下载完成后按照提示安装完成, 环境变量配置: 打开环境变量,在系统变量中找到PATH项,添加上JAVA安装目录bin目录;然在系统变量
$num = 10.4567; //第一种:利用round()对浮点数进行四舍五入 echo round($num,2); //10.46 //第二种:利用sprintf格式化字符串 $format_num = sprintf("%.2f",$num);