摘要: 1 import java.io.File; 2 import java.io.FileInputStream; 3 import java.io.FileNotFoundException; 4 import java.io.IOException; 5 6 public class Demo4 { 7 8 public static void main(Strin... 阅读全文
posted @ 2016-12-06 20:50 阿水写程序 阅读(839) 评论(0) 推荐(0) 编辑
摘要: 1 // 2 // ViewController.m 3 // 连带滑动效果图 4 // 5 // Created by apple on 16/8/20. 6 // Copyright © 2016年 apple. All rights reserved. 7 // 8 9 #import "ViewController.h" 10 #defin... 阅读全文
posted @ 2016-12-04 19:37 阿水写程序 阅读(331) 评论(0) 推荐(0) 编辑
摘要: public class FileLei { public static void main(String[] args) throws IOException { //..表示上一级目录 .表示当前所在目录 File file = new File("C:\\Users\\cdlx2016\\De 阅读全文
posted @ 2016-12-03 21:01 阿水写程序 阅读(617) 评论(0) 推荐(1) 编辑
摘要: 1 import java.math.BigDecimal; 2 import java.text.DecimalFormat; 3 import java.text.NumberFormat; 4 public class format { 5 double f = 111231.5585; 6 public void... 阅读全文
posted @ 2016-12-03 12:56 阿水写程序 阅读(325154) 评论(2) 推荐(4) 编辑
摘要: import java.util.Scanner;class CalendarMain{ //主函数入口 public static void main(String[] args) { System.out.println("*****请输入日期(格式如: 2011-01)*****"); Sca 阅读全文
posted @ 2016-11-20 17:40 阿水写程序 阅读(2612) 评论(0) 推荐(0) 编辑
摘要: import java.util.Scanner; class Java继承 { public static void main(String[] args) { Company company = new Company(); company.name = "江工租赁公司"; company.limousine = new L... 阅读全文
posted @ 2016-11-19 09:32 阿水写程序 阅读(294) 评论(0) 推荐(0) 编辑
摘要: 通过仿照京东网页让我们对wed的知识得到了全面的了解:首先对Html内容层的使用,对Html标签对应角色的掌握; 其次是对css样式层的熟练,它要做的是一块内容以什么样的样式显示(如:字体大小、颜色、宽高等); 再次是对JavaScript行为层的方法使用,主要是实现一些动态效果(如:图片切换、图片 阅读全文
posted @ 2016-11-18 13:59 阿水写程序 阅读(1078) 评论(2) 推荐(0) 编辑
摘要: 单例模式的特点: 1.单例类只能有一个对象(实例)。 2.单例类必须自己创建自己的唯一实例 。 3.单例类必须给所有其他对象提供这一实例。 设置步骤: 1.将对象的应用成员变量用private来修饰。 2.保证对象的唯一性。 3.提供一个静态方法接收唯一的对象。 4.把构造方法设置为私有方法,防止n 阅读全文
posted @ 2016-11-18 10:55 阿水写程序 阅读(228) 评论(0) 推荐(0) 编辑
摘要: 1 package 作业; 2 3 import java.text.DateFormat; 4 import java.text.SimpleDateFormat; 5 import java.util.ArrayList; 6 import java.util.Date; 7 import java.util.Iterator; 8 import java.... 阅读全文
posted @ 2016-11-17 20:44 阿水写程序 阅读(756) 评论(1) 推荐(1) 编辑
摘要: 1 class Arithmetic{ 2 public static void main(String args []){ 3 System.out.println("\t\t\t===冒泡排序==="); 4 int[] num1 = {3,6,2,4,8}; 5 //原理:将数组的元素两两作比较,然后依次将最大值往后面排... 阅读全文
posted @ 2016-11-15 13:07 阿水写程序 阅读(498) 评论(0) 推荐(0) 编辑