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

java¶¯Ì¬µ÷ÓÃÀà

package tf;
public class TestPack {
public static void main(String [] args)
{
try
{
IAnimal cAnimal = new bird();
cAnimal.shout();
IAnimal animal =(IAnimal)java.lang.Class.forName("tf.bird").newInstance();
animal.shout();
}
catch (Exception e) {
// TODO: handle exception
}
}
}
//tf.bird ¼ÓÉÏ°üÃû
//bird.java
package tf;
public class bird implements IAnimal{
public void shout()
{
System.out.println("c c jiji ");
}
}
//IAnimal.java
package tf;
public interface IAnimal {
public void shout();
}
c c jiji
c c jiji


Ïà¹ØÎĵµ£º

javaËÄÉáÎåÈëBigDecimal

javaËÄÉáÎåÈë
package Test;
import java.math.BigDecimal; //ÒýÈëÕâ¸ö°ü
public class Test {
  public static void main(String[] args) {
   double i = 3.856;
   // ÉáµôСÊýÈ¡Õû
   System.out.println("ÉáµôСÊýÈ¡Õû:Math.floor(3.856)=" + (int) Math.floor(i));
......

ʵսÌå»áJava¶àÏ̱߳à³Ì¾«Òª

ÔÚ Java ³ÌÐòÖÐʹÓöàÏß³ÌÒª±ÈÔÚ C »ò C++ ÖÐÈÝÒ׵ö࣬ÕâÊÇÒòΪ Java ±à³ÌÓïÑÔÌṩÁËÓïÑÔ¼¶µÄÖ§³Ö¡£±¾ÎÄͨ¹ý¼òµ¥µÄ±à³ÌʾÀýÀ´ËµÃ÷ Java ³ÌÐòÖеĶàÏß³ÌÊǶàôֱ¹Û¡£¶ÁÍê±¾ÎÄÒÔºó£¬Óû§Ó¦¸ÃÄܹ»±àд¼òµ¥µÄ¶àÏ̳߳ÌÐò¡£
 
¡¡¡¡ÎªÊ²Ã´»áÅŶӵȴý?
 
¡¡¡¡ÏÂÃæµÄÕâ¸ö¼òµ¥µÄ Java ³ÌÐòÍê³ÉËÄÏî²»Ïà¹ØµÄÈÎÎñ¡£ÕâÑùµ ......

¡¶ÇáÁ¿¼¶Java EEÆóÒµÓ¦ÓÃʵս¡· AntÓ÷¨


AntÓ÷¨——Õª×Ô¡¶ÇáÁ¿¼¶Java EEÆóÒµÓ¦ÓÃʵս¡·
1.6 AntµÄ°²×°ºÍʹÓÃ
AntÊÇÒ»ÖÖ»ùÓÚJavaµÄÉú³É¹¤¾ß
¡£´Ó×÷ÓÃÉÏÀ´¿´£¬ËüÓÐЩÀàËÆÓÚC±à³Ì£¨Unixƽ̨ÉÏʹÓý϶ࣩÖеÄMake¹¤¾ß£¬C/C++ÏîÄ¿
¾­³£Ê¹ÓÃMake¹¤¾ßÀ´¹ÜÀíÕû¸öÏîÄ¿µÄ±àÒë¡¢Éú³É¡£
MakeʹÓÃShellÃüÁîÀ´¶¨Òå
Éú³ÉÈÎÎñ£¬²¢¶¨ÒåÈÎÎñÖ®¼äµÄÒÀÀµ¹Øϵ£¬ÒÔ±ãË ......

JAVA AWT ʼþ´¦Àí¼°ÄÚ²¿ÀàµÄʵÏÖ


import java.awt.*;
import java.awt.event.*;
public class TestFrame {
 Frame fm = new Frame();
 public void init(){
  
  fm.setSize(300,300);
  Button btn = new Button("ok");
  
  fm.add(btn);
  btn.addActionListener(ne ......

Java±àÂë¾­Ñé

1£¬Ò»ÐдúÂë×öÒ»¼þÊ£¬²»ÒªÔÚÒ»ÐдúÂëÀïÃæ´¦Àí¶à¼þÊ¡£ÄþÔ¸¶àÉùÃ÷¼¸¸ö±äÁ¿£¬Ò²Òª±£³Ö´úÂëµÄÇåÎú£¬ÒòΪ´úÂëµÄÉùÃ÷²¢²»»áÕ¼¶àÉÙÄÚ´æ¡£
ÀýÈ磺
          String tmpa = errIdList.get(i).toString().substring(2);
           ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ