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

Java½Ó¿ÚµÄ×÷Óü°ÊµÀý

 ½üÈÕÔÚ±à³ÌÖÐÓõ½½Ó¿Ú֪ʶ,ÓÉÓڿα¾ÖжԽӿÚÃèÊö½ÏÉÙ,ËùÒÔÏë´ÓÍøÉϲéÕÒ×ÊÁÏ,µ«ÍøÉϵÄ×ÊÁÏ´ó¶àÒ²Ö»ÊÇÈß³¤µÄÃèÊö,ËùÒÔÔÚ´ËÌṩһ×Ô¼ºÐ´µÄʵÀý,¹©´ó¼Ò²Î¿¼:
Ô­ÌâÊÇÕâÑùµÄ£ºÔÚjavaÖУ¬¶¨ÒåÒ»¸ö½Ó¿Ú£¬ÉùÃ÷¼ÆË㳤·½ÐÎÃæ»ýºÍÖܳ¤µÄ³éÏó·½·¨£¬ÔÙÓÃÒ»¸öÀàȥʵÏÖÕâ¸ö½Ó¿Ú£¬ÔÙ±àдһ¸ö²âÊÔÀàȥʹÓÃÕâ¸ö½Ó¿Ú¡£
Ê×ÏÈ£¬½Ó¿Ú±ØÐëµ¥¶À´æ·Å£¬Èç¹ûÎÒÃÇÓÃeclipse±à³ÌµÄ»°£¬ËüÃÇÌáʾ£ºThe public type **** must be defined in its own file£¬Òâ˼ÊDZØÐëÒª¶¨ÒåÔÚÆä×Ô¼ºµÄÎļþÖУ¬ËùÒÔҪΪ½Ó¿ÚÎļþµ¥¶À´æ·ÅÆðÀ´£¬¾ÙÀý£¬ÎÒÃǵĽӿÚҪʵÏÖ»ñµ½¾ØÐεij¤£¬¿í£¬Ãæ»ý£¬Öܳ¤£¬ËùÒÔ¶¨ÒåÒÔϵĽӿڡ£
public interface calrect {
public abstract int calarea();
public abstract int calgirth();
public abstract int getx();
public abstract int gety();
}
×¢Ò⣬¶¨Òå½Ó¿Ú¾ÍÏñ¶¨ÒåÀàÒ»Ñù£¬½Ó¿ÚµÄ·ÃÎÊ¿ØÖÆ·ûÖ»ÄÜÓÃpublic£¬ÓÃpublic¶¨ÒåµÄ½Ó¿Ú¿ÉÒÔ±»ËùÓеÄÀàºÍ°üÒýÓ㬶øȱʡµÄÔòÖ»Äܱ»Í¬Ò»¸ö°üÖеÄÆäËûÀàºÍ½Ó¿ÚÒýÓã¬Õâ·ûºÏJAVAÖзÃÎÊ¿ØÖÆ·ûµÄÒ»°ãÒªÇ󣬹ØÓÚ½Ó¿ÚÔÙÒýÓÃÆäËû½Ó¿ÚÔòÊǺ󻰡£ÒÔÉϽӿÚÎļþÃûΪcalrect.java.ÁíÍâÐèÒªÖ¸³öµÄÊǽӿÚÖв»Äܸø·½·¨¸ø³ö·½·¨Ìå¡£
½ÓÏÂÀ´£¬ÐèÒª¶¨ÒåÒ»¸öÀàÀ´ÊµÏÖ½Ó¿Ú£¬ÒòΪ²»ÖªµÀJAVAµÄÄÚÖþØÐÎÀàÊÇʲôÃû£¬ËùÒÔΪÁË°²È«£¬½«¸ÃÀඨÒåΪRRect£¬Õâ¿ÉÒÔÈÏΪÊÇÒ»ÖÖ°²È«²ßÂÔ¡£¹ØÓÚimplements£¬¿ÉÒԲο¼ÆäËû×ÊÁÏ¡£¸ÃÀàÒýÓÃÁ˽ӿÚcalrect£¬ËùÒÔ±ØÐë¶ÔcalrectÖеķ½·¨Ò»Ò»ÊµÏÖ¡£
//¶¨Òå¾ØÐÎÀà Ó¦ÓýӿÚ
class RRect implements calrect{
private int x;
private int y;
public RRect (){
   x=3;y=4;
}
public int calarea(){
   return x*y;
}
public int calgirth(){
   return x*2+y*2;
}
public int getx(){
   return x;
}
public int gety(){
   return y;
}
}
//½ÓÏÂÀ´£¬¶¨ÒåÒ»¸ö²âÊÔÀ࣬Ëùν²âÊÔÀ࣬ÎÒÀí½âΪ¶¨ÒåÒ»¸öÀ࣬ÔÚÆ䶨ÒåÀàRRectµÄ¶ÔÏ󣬲¢ÑéÖ¤ÆäÖеķ½·¨£¬¿´¿´ÊDz»ÊÇ¿ÉÒÔÕý³£Ê¹ÓÃ
//¶¨ÒåClass1Àà
public class Class1{
RRect rect;
public static void main(String []args){
   RRect rect=new RRect();
   System.out.println("¾ØÕóµÄ³¤"+ rect.getx());
   System.out.println("¾ØÕóµÄ¿í"+ rect.calarea());
   System.out.println("¾ØÕóµÄÃæ»ý"+ rect.calarea());
   System.o


Ïà¹ØÎĵµ£º

javaС³ÌÐò£¨3£©

¡¾ÎÄÕ±êÌâ¡¿javaС³ÌÐò£¨3£©
¡¾ÎÄÕÂ×÷Õß¡¿Ôø½¡Éú
¡¾×÷ÕßÓÊÏä¡¿zengjiansheng1@126.com
¡¾×÷ÕßQQ¡¿190678908
¡¾×÷ÕßÉùÃ÷¡¿±¾ÈËˮƽÓÐÏÞ£¬Ê§ÎóÖ®´¦£¬¾´Çë¸÷λָ³ö¡£±¾ÈËÒÔǰдµÄһЩС³ÌÐò£¬·ÖÏíÒ»ÏÂÏ£Íû¶Ô¸÷λѧϰjavaÓаïÖú ^-^
***************************************************************************** ......

Java´Ó¿ØÖÆ̨ÖжÁÈ¡Êý¾ÝÍêÈ«¹¥ÂÔ

0¡¡ÒýÑÔ
´Ó¿ØÖÆ̨ÖжÁÈ¡Êý¾ÝÊÇÒ»¸ö±È½Ï³£ÓõŦÄÜ£¬ÔÚ JDK 5.0 ÒÔÇ°µÄ°æ±¾ÖеÄʵÏÖÊDZȽϸ´Ôӵģ¬ÐèÒªÊÖ¹¤´¦ÀíϵͳµÄÊäÈëÁ÷¡£ÓÐÒâ˼µÄÊÇ£¬´Ó JDK 5.0 °æ±¾¿ªÊ¼£¬ÄÜ´Ó¿ØÖÆ̨ÖÐÊäÈëÊý¾ÝµÄ·½·¨Ã¿Ôö¼ÓÒ»¸ö°æ±¾ºÅ£¬¾ÍÓÐÒ»ÖÖÐÂÔöµÄ·½·¨£¬ÕâÒ²Ôö¼ÓÁËÑ¡ÔñµÄÖÖÀ࣬¿ÉÒÔÒÀ¾Ý²»Í¬µÄÒªÇóÀ´½øÐÐÑ¡Ôñ¡£ÏÂÃæÀ´¿´Ò»Ï£¬¸÷¸ö°æ±¾ÖÐÈçºÎ´Ó¿ØÖ ......

javaµ÷ÓÃ.net Webservice

Ò»¡¢.net Server¶Ë
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;
using System.Web.Services.Description;
namespace WebApplica ......

javaÊý¾ÝÀàÐÍת»»

һЩ³õѧJAVAµÄÅóÓÑ¿ÉÄÜ»áÓöµ½JAVAµÄÊý¾ÝÀàÐÍÖ®¼äת»»µÄ¿àÄÕ£¬ÀýÈ磬ÕûÊýºÍfloat,doubleÐÍÖ®¼äµÄת»»£¬ÕûÊýºÍStringÀàÐÍÖ®¼äµÄת»»£¬ÒÔ¼°´¦Àí¡¢ÏÔʾʱ¼ä·½ÃæµÄÎÊÌâµÈ¡£ÏÂÃæ±ÊÕ߾Ϳª·¢ÖеÄһЩÌå»á½éÉܸø´ó¼Ò¡£
 ÎÒÃÇÖªµÀ£¬JavaµÄÊý¾ÝÀàÐÍ·ÖΪÈý´óÀ࣬¼´²¼¶ûÐÍ¡¢×Ö·ûÐͺÍÊýÖµÐÍ£¬¶øÆäÖÐÊýÖµÐÍÓÖ·ÖΪÕûÐͺ͸¡µãÐÍ£»Ïà¶Ô ......

Java Reflection (JAVA·´Éä) Ïê½â

 
    JavaÓïÑÔ·´ÉäÌṩһÖÖ¶¯Ì¬Á´½Ó³ÌÐò×é¼þµÄ¶à¹¦ÄÜ·½·¨¡£ËüÔÊÐí³ÌÐò´´½¨ºÍ¿ØÖÆÈκÎÀàµÄ¶ÔÏó(¸ù¾Ý°²È«ÐÔÏÞÖÆ)£¬ÎÞÐèÌáÇ°Ó²±àÂëÄ¿±êÀà¡£ÕâЩÌØÐÔʹµÃ·´ÉäÌرðÊÊÓÃÓÚ´´½¨ÒԷdz£ÆÕͨµÄ·½Ê½Óë¶ÔÏóЭ×÷µÄ¿â¡£ÀýÈ磬·´Éä¾­³£ÔÚ³ÖÐø´æ´¢¶ÔÏóΪÊý¾Ý¿â¡¢XML»òÆäËüÍⲿ¸ñʽµÄ¿ò¼ÜÖÐʹÓá£Java reflection ·Ç³£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ