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

JAVA×Ö·û´®²Ù×÷

1¡¢   public class HelloWorld {
    public static void main(String args[]){
     String s="daxiong";
     System.out.println("Hello,World!"+"lu shenglong"+s);
     char c[]={'s','w','q'};
     String u=new String(c);
     System.out.println(u);
     char ch;
     ch=u.charAt(1);                //×Ö·û½ØÈ¡º¯Êý   
     System.out.println(ch);
     char cha[]=new char[3];
     cha=u.toCharArray();
     for(int i=0;i<3;i++)
      System.out.print(cha[i]+"¡¢");
   
    }
    }
 Êä³ö£º
Hello,World!lu shenglongdaxiong
swq
w
s¡¢w¡¢q¡¢
2¡¢JAVAÖГ==”±È½ÏµÄÊǶÔÏóµÄµØÖ·£¬¶øequals()·½·¨±È½ÏµÄÊǶÔÏóµÄÖµ¡£
3¡¢ÐÞ¸Ä×Ö·û´® String e="windows".replace('w','q');     Êä³ö£ºqindoqs
4¡¢trim()·½·¨£º¸Ã·½·¨·µ»ØÒ»¸öµ÷ÓÃ×Ö·û´®µÄ¿½±´£¬½«Î»ÓÚ×Ö·û´®Ç°ÃæºÍºóÃæµÄ¿Õ°××Ö·ûɾȥ£¬Ò»°ãÐÎʽÈçÏ£ºString s="  hello world  ".trim();
Êä³ö½á¹ûΪ£ºhello world
Ó¦ÓÃʵÀý;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Test {
   public static void main(String args[]) throws IOException{
 BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
 String str;
 System.out.println("Enter'stop'to quit;");
 System.out.println("Enter Name:");
 do{
  str=br.readLine();
  str=str.trim();
  if(str.equals("Tom"))
   System.out.println("Tom is 10 years old.");
  
 }while(!str.equals("stop"));
 
   }
}
Êä³ö£ºEnter'stop'to quit;
Enter Name:
Tom
Tom i


Ïà¹ØÎĵµ£º

javaÄÚ´æ¹ÜÀí

1. JVMÄÚ´æ¶Î·ÖÅä¼°Æô¶¯²ÎÊý£º
J2EE·þÎñÆ÷µÄÄÚ´æ×é³É£º
? Java¶Ñ£ºÎÒÃǵijÌÐòºÍ¶ÔÏó¶¼ÔÚÕâ¸ö¶Ñ½øÐйÜÀí
? C¶Ñ£ºµ±ÒýÓõ½Ò»Ð©NativeµÄ¶ÔÏó£¬ÈçÍøÂç·ÃÎÊ¡¢OCI·½Ê½µÄÊý¾Ý¿âÁ¬½ÓµÈ¶¼ÔÚC¶ÑÀï½øÐйÜÀí
Java¶ÑµÄÃèÊö£º
ÈçÏÂͼ
 
ÄÚ´æÓÉ Perm ºÍ Heap ×é³É. ÆäÖÐ
Heap = {Old + young = { Eden , from, to } }
? You ......

¼òµ¥µÄjavaͼƬËõ·Å´úÂë

/**
* @param source: source image file
* @param output: output image file
* @param mode: 0 ratio,1 maxWidth,2 maxHeight,3 maxSide
* @param maxSide: maxWidth, maxHeight or maxSide, different by mode
* @param ratio: ratio if resized by ratio
*/
public static void resizeImage(File ......

Java native2ascii ¼òµ¥×ªÂë

native2ascii.exe ÊÇ Java µÄÒ»¸öÎļþתÂ빤¾ß£¬Êǽ«ÌØÊâ¸÷ÒìµÄÄÚÈÝ ×ªÎª ÓÃÖ¸¶¨µÄ±àÂë±ê×¼ÎÄÌåÐÎʽͳһµÄ±íÏÖ³öÀ´£¬Ëüͨ³£Î»ÓÚ JDK_home\bin Ŀ¼Ï£¬°²×°ºÃ Java SE ºó£¬¿ÉÔÚÃüÁîÐÐÖ±½ÓʹÓà native2ascii ÃüÁî½øÐÐתÂ룬ʾÀý£º
native2ascii -encoding 8859_1 c:\test.txt c:\temp.txt
½« test.txt ÎļþÄÚÈÝÓà 8859_1 × ......

JavaÇóÖ°¼òÀú

¸ö ÈË ¼ò Àú
ÐÕ    Ãû£º
ÍõÖ¾¹ú
ÐÔ    ±ð£º
ÄÐ
Äê    Á䣺
23Ëê
ÁªÏµµç»°£º
13124799190
ר    Òµ£º
¼ÆËã»ú¼¼Êõ
¹¤×÷ʱ¼ä£º
Ò»ÄêÒÔÉÏ
ѧ    Àú£º
´óר
ÓÊ    Ï䣺
andy478168@yeah.net
¡ï ÇóÖ°ÒâÏò
¹¤×÷ÐÔÖÊ ......

ÔÚJavaÖе÷ÓÃC++

ÔÚjavaÖе÷ÓÃ×Ô¼ºµÄc++´úÂëÊÇÒ»¼þ¼òµ¥µÄÊÂÇ飬ÒÔÏÂÀàΪÀý£º
class Prompt {
  private native String getLine(String prompt);
  public static void main(String args[]) {
    Prompt p = new Prompt();
    String input = p.getLine("Type a line: ");
  &nbs ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ