Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

XPϵͳÏÂJavaÐÞ¸ÄÎļþ»òÎļþ¼ÐÊôÐԵĴúÂë¡£

 2009-11-09  15:33:36
ÎļþÊôÐÔÅäÖÃÀà
package cn.sist.file;
public class FileProperty {
private int sysProperty = 0;
private int hiddenProperty = 0;
private int readProperty = 0;
private int arriveProperty = 0;
private boolean changeAll = false;


public FileProperty setChangeAll(boolean changeAll){
this.changeAll = changeAll;
return this;
}

public boolean getChangeAll(){
return this.changeAll;
}
protected int getArriveProperty() {
return arriveProperty;
}
public FileProperty addArriveProperty() {
this.arriveProperty = 1;
return this;
}
public FileProperty removeArriveProperty(){
this.arriveProperty = 2;
return this;
}
protected int getHiddenProperty() {
return hiddenProperty;
}
public FileProperty addHiddenProperty() {
this.hiddenProperty = 1;
return this;
}
public FileProperty removeHiddenProperty(){
this.hiddenProperty = 2;
return this;
}
protected int getReadProperty() {
return readProperty;
}
public FileProperty addReadProperty() {
this.readProperty = 1;
return this;
}
public FileProperty removeReadProperty(){
this.readProperty = 2;
return this;
}
protected int getSysProperty() {
return sysProperty;
}
public FileProperty addSysProperty() {
this.sysProperty = 1;
return this;
}
public FileProperty removeSysProperty(){
this.sysProperty = 2;
return this;
}
}

ÎļþÐÞ¸ÄÀà
package cn.sist.file;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
public class FilePropertyChange {
private static final String xpCommand = "cmd /c attrib";
private static final String[] xpSysProperty = {"","+s","-s"};
private static final String[] xpHiddenProperty = {"","+h","-h"};
private static final String[] xpArriveProperty = {"","+a","-a"};
private static final String[] xpReadOnlyProperty = {"","+r","-r"};
/*
* defaultFileProperty onl


Ïà¹ØÎĵµ£º

javaÖÐÈçºÎ°ÑÒ»¸öĿ¼ÏµÄÎļþÒÆµ½ÁíÒ»¸öÖ¸¶¨Ä¿Â¼ÖÐ

 import java.io.*;
public class FileToFile
{
 public static void main(String[] args)
 {
   File fold = new File("e:\\java\\file.java");//ij·¾¶ÏµÄÎļþ
   String strNewPath = "e:\\java\\new file\\";//з¾¶
   File fnewpath = new File(strNewPath); ......

Java¿ªÔ´Éí·ÝÑéÖ¤


 JOSSO 
JOSSO(Java Open Single Sign-On)ÊÇÒ»¸ö¿ªÔ´µÄJ2EE-basedµÄSSO(SSO£ºµ¥Ò»µÇ¼¼¼ÊõÊÇÒ»ÖÖÈÏÖ¤ºÍÊÚȨ»úÖÆ£¬ËüÔÊÐí×¢²áÓû§Ö»ÐèÒªÔÚÈÎÒ»³ÉÔ±ÍøÕ¾ÉϵǼһ´Î£¬¶øºóÊÚȨ·ÃÎÊÆäËûÁ¬½ÓµÄ·ÖÖ§ÍøÕ¾£¬ÎÞÐèÔÙ½øÐÐÑéÖ¤µÇ¼)»ù´¡½á¹¹.ËüµÄÄ¿µÄÊÇÌṩһÖÖÓÃÀ´½â¾öÔÚͳһƽ̨ÉϽøÐÐÓû§¼¯ÖÐÈÏÖ¤µÄ·½°¸.
¸ü¶àJOSSOÐÅÏ ......

javaµÝ¹éʵÀý

 example£º Çó5µÄ½×³Ë¡£¡£

ÈçÏ£º

public class Test {
static int multiply(int n){
if(n==1||n==0)
return n;
else
return n*multiply(n-1);
}

public static void main(String[] args){
System.out.println(multiply(10));
}
......

java Ñ­»·´òÓ¡³öij¶ÔÏóËùÔÚÀàµÄÀàÃûºÍ·½·¨

java Ñ­»·´òÓ¡³öij¶ÔÏóËùÔÚÀàµÄÀàÃûºÍ·½·¨
public class A {

public void b(){}
public void c(){}
public void d(){}
public void e(){}
}
import java.lang.reflect.*;
public class StaticTest {

public static void test(Object obj)
{
Class myclass = obj.getClass();
//System.out.prin ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ