一、File
(一)概述
1、File:
1)文件和目录(文件夹)路径名的抽象表示形式
2)注意:
可以表示文件夹与文件,即路径与文件
抽象概念,即路径与文件是否存在不确定
2、构造方法
1)File(String pathname):根据一个路径得到File对象
File file = new File("E:\\demo\\a.txt");
2)File(String parent, String child):根据一个目录和一个子文件/目录得到File对象
File file2 = new File...
分类:
其他好文 时间:
2015-05-13 21:56:54
阅读次数:
135
字符串输出函数 puts格式: puts(字符数组名)功能:把字符数组中的字符串输出到显示器。 即在屏幕上显示该字符串。字符串输入函数 gets格式: gets (字符数组名)功能:从标准输入设备键盘上输入一个字符串。本函数得到一个返回值,即为该字符数组的首地址。1 #include"stdio.h...
分类:
其他好文 时间:
2015-05-13 21:37:42
阅读次数:
120
最基本的模块测试1:首先创建一个java工程,在工程中创建一个被单元测试的Student数据类,如下:package UnitTest;public class Student { private String name; private String sex; private i...
分类:
编程语言 时间:
2015-05-13 21:35:13
阅读次数:
159
String path = req.getContextPath();//返回的是项目的根目录 /sshreq.getScheme();//返回的是当前页面服务器的协议; http 或是httpsreq.getServername();//返回的是当前页面服务器的名称; localhost;req....
分类:
Web程序 时间:
2015-05-13 21:33:12
阅读次数:
177
一、基础篇 1.不借助第三者实现两个变量值的交换:package basic;import java.util.Scanner;public class ExchangeValue { public static void main(String[] args) { Scanner scan = ....
分类:
编程语言 时间:
2015-05-13 21:30:42
阅读次数:
182
经典的先看下面一段代码,请问最终创建几个对象,分别在哪里?String s0 = new String("luoliang.me");String s1 = "luoliang.me";String s2 = new String("luoliang.me");想要回答这个问题,先得搞清楚new S...
分类:
其他好文 时间:
2015-05-13 21:22:56
阅读次数:
156
substr_replace(PHP 4, PHP 5)substr_replace—替换字符串的子串说明mixedsubstr_replace(mixed$string,mixed$replacement,mixed$start[,mixed$length] )substr_replace()在字...
分类:
移动开发 时间:
2015-05-13 21:22:16
阅读次数:
189
PS: 开始ACM的受虐!site:http://acm.acmcoder.com/listproblem.php一、1000import java.util.Scanner;public class Main { public static void main(String args[]) { ....
分类:
其他好文 时间:
2015-05-13 21:22:06
阅读次数:
165
ItemCreated(){ if (e.Item.DataItem != null) { string examTypeId = ((DataRowView)e.Item.DataItem).Row["columnName"].ToString(); e.Item.FindC...
分类:
其他好文 时间:
2015-05-13 21:19:25
阅读次数:
100
class Program { static void Main(string[] args) { long val = 123456789; Console.WriteLine(Parse64Encode(val)); ...
分类:
其他好文 时间:
2015-05-13 21:13:35
阅读次数:
199