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

javaÓï·¨ÎÊÌâ - Java / Java EE

import java.io.*;
class FileTest
{
public static void main(String [] args) throws Exception
{

File fDir=new File(File.separator);
String strFile="javaÔ´´úÂë²âÊÔ"+File.separator+"java2»ù´¡ÖªÊ¶";
File f = new File(fDir,strFile);
String [] names=f.list(new FilenameFilter()
{
public boolean accept(File dir,String name)
{
if(true)
return name.indexOf(".java")!=-1;


}
});
for (int i=0;i<names.length;i++)
System.out.println(names[i]);
}
}

ΪʲôÕâÌõÓï¾ä±àÒ벻ͨ¹ýÄØ£¿
public boolean accept(File dir,String name)
Àï±ß£¬Èç¹ûif²»³ÉÁ¢¡£·µ»Øʲô£¿ÐèÒª¸ø³ö¡£²»È»±àÒëÆ÷²»ÈÃͨ¹ý

Äã²»Èç°Ñif(true) ¸øÈ¥ÁËËãÁË£¬·´Õý¶¼ÊÇtrueÁË

 
  Â¥ÉÏÁ½Î»ËµµÄÕýÈ·¡£°Ñif£¨true£©È¥µô¾Í¿ÉÒÔÁË¡£

  ËäÈ»if(true)ºã±»Ö´ÐУ¬µ«ÊDZàÒëÆ÷»¹ÊÇ»áÅÌif²»³ÉÁ¢µÄÇé¿ö£¬Èç¹ûif²»³ÉÁ¢£¬¾ÍûÓзµ»ØÖµ£¬ËùÓбàÒë²»¹ýÁËŶ

String [] names=f.list(new FilenameFilter() { 
public boolean accept(File dir,String name) {
if(true)
return name.indexOf(".java")!=-1;



  }
);

Õâ¾äÊÇʲôÒâ˼°¡£¿

Õý½â


Ïà¹ØÎÊ´ð£º

Unable to compile class for JSP - Java / Web ¿ª·¢

<%@page language="java" contentType="text/html;charset=gb2312" import="java.sql.*"%>
<jsp:useBean id="db" class="wang.connectDB"/>
< ......

javaµÄÎÊÌâ ¼±¼±£¡!

ÎÒÔÚeclipseÖÐдÁËÒ»¸ö²¥·ÅÒôÀÖµÄÀ࣬²¢°ÑÒôÀÖÎļþºÍÀàÎļþ·ÅÔÚÁËÒ»Æ𣬽á¹ûÔËÐÐʱ£¬³öÏÖ´íÎó£¬ËµÊÇÒôÀÖÎļþÄǸöÊǿյģ¬µ«ÊÇÔÚjcreatorÓÃͬÑùµÄ·½·¨½á¹ûÊÇ¿ÉÒÔÔËÐеģ¬ÇëÇó¸ß˵ָ½Ì£¬¸æËßΪʲô£¿¼±
ÄãÈôÊÇÔÚWindo ......

ÇëÀÏÊÖ½âÊ͸ÅÄî¡£javaµÄ¹¦ÄÜÄ£¿é

ÎÒ¸Õ×öjava.Óкܶà¸ÅÄîÐԵĶ«Î÷²»ÊǺÜÇå³þ¡£²»ÒªÐ¦ÎÒ°¡¡£
ÕâÁ½ÌìÓиö¹«Ë¾ËµÏȸøÎÒ¸ö¶«Î÷×ö×ö¡£ÒªÇóÊÇÕâÑùµÄ
¡¾Ð´Ò»·ÝÐèÇó˵Ã÷£¬¼òµ¥µÄÉè¼Æ˵Ã÷£¬²¢ÇÒ×öÒ»¸ö¼òµ¥µÄ¹¦ÄÜÄ£¿é³öÀ´¡£¡¿
ÐèÇó˵Ã÷ºÍÉè¼Æ˵Ã÷ÎÒÖªµ ......

ÐÂÊÖÌáÎÊ£¡Java¿Ø¼þ¼äÈçºÎ½øÐд«Öµ

±ÈÈçÒ»¸öJButton¿Ø¼þ£¬ÈçºÎ°ÑËüµÄÖµ£¨¼ÙÉèΪ1£©´«µ½JTextFieldÉϲ¢ÏÔʾ³öÀ´£¬²¢ÇÒ°ÑJButtonµÄÖµË͸øÒ»¸ö±äÁ¿
£¨ÎÒÖªµÀÒªÓüàÌýÆ÷£¬µ«ÊÇʼþ·¢Éúºó´¦ÀíµÄ·½·¨Ôõôд²»ÖªµÀ£©
Íû¸÷λ´óÏÀÖ¸½Ì£¡
±ÈÈçÒªÐ޸ĵÄJTe ......

ÕÒ¹¤×÷£­java Èí¼þ¿ª·¢

¼ÆËã»ú¿ÆѧÓë¼¼Êõ¸öÈ˼òÀú

»ù±¾ÐÅÏ¢

ÐÕ¡¡¡¡Ãû£º ÀîÑ×                          ÏàƬ£º

ÐÔ¡¡¡¡±ð£ºÄÐ

³öÉúÈÕÆÚ£º1 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ