最新日志

2019-12-12 aflfte2011

逻辑运算符

/**
 * 逻辑运算符测试
 * @author aflft
 *
 */
public class TestOperator03 {
public static void main(String[] args) {
boolean b1=true;

2019-12-12 aflfte2011

关系运算符

/**
 * 关系运算符测试
 * @author aflft
 *
 */
public class TestOperator02 {
public static void main(String[] args) {
int a = 3;

2019-12-12 aflfte2011

算术运算符

/**
 * 测试算术运算符
 * @author aflft
 *
 */
public class TestOperator01 {
public static void main(String[] args) {
byte a=1;

2019-12-12 aflfte2011

字符类型和布尔类型

/**
 * 测试字符类型和布尔类型
 * @author aflft
 *
 */
public class TestPrimitveDateType3 {
public static void main(String[] args) {
char a = 'T'

2019-12-12 aflfte2011

浮点数据类型测试

浮点数据类型学习测试
TestPrimitiveDateType2.java

/**
 * 测试浮点型
 * @author jinhao
 *
 */
import java.math.*;
public class TestPrimitiveDateType2 {
public static v

2019-12-12 aflfte2011

JAVA基本数据类型测试

基本数据类型测试文件
TestPrimitveDateType.java源码:
/**
 * 测试基本数据类型
 * @author jinhao
 *
 */
public class TestPrimitiveDateType {
public static void main(String[] args) {

2019-12-12 aflfte2011

JAVA常量测试源码

常量测试文件
TestConstant.java源码:
/**
 * 常量测试
 * @author jinhao
 *
 */
public class TestConstant {
public static void main(String[] arge) {

2019-12-12 aflfte2011

BallGame桌球源码

实现ball小球的直线来回运动。
BallGame.java源码:
import java.awt.*;
import javax.swing.*;
public class BallGame extends JFrame {

Imag

2019-12-4 aflfte2011

windows 10配置JAVA SE环境方法

首先我们需要下载java开发工具包JDK,下载地址:http://www.oracle.com/technetwork/java/javase/downloads/index.html,下载完成后按照提示安装完成,
环境变量配置:
打开环境变量,在系统变量中找到PATH项,添加上JAVA安装目录bin目录;然在系统变量

2019-12-3 aflfte2011

PHP保留两位小数的方法

$num = 10.4567;
     
    //第一种:利用round()对浮点数进行四舍五入
    echo round($num,2); //10.46
     
    //第二种:利用sprintf格式化字符串
    $format_num = sprintf("%.2f",$num);
 

«... 15 16 17 18 19 20 21