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

java ·ÖÆ»¹û

ÓÐ600¸öÆ»¹û£¬10¸öºÐ×Ó£¬ÒªÇó°Ñ600¸öÆ»¹û·Ö×°µ½10¸öºÐ×ÓÀï¡£Èç¹ûÓÐÈËÀ´ÂòÆ»¹ûËæ±ã˵³öÒ»¸öÊý£¬Ö±½ÓÄÃÕâЩºÐ×Ó×éװһϾͿÉÒÔ¸øËû²»Óòð·ÖºÐ×Ó¡£ÇëÎÊÕâ10¸öºÐ×ÓÓ¦¸Ã·Ö±ð×°¶àÉÙÆ»¹û£¿
´úÂëÈçÏÂ
import java.util.Scanner;
public class Test {
 public static void main(String[] args) {
  int box[] = new int[10];
  int count = 600;
  int apple = 1;
  for(int i=0;i<box.length-1;i++){
   box[i] = apple;
   apple = apple*2;
  }
  box[box.length-1] = count - apple + 1;
  System.out.println("ÇëÊäÈëÄúÐèÒªµÄÊý×Ö£º");
  Scanner sc = new Scanner(System.in);
  int math = sc.nextInt();
  
  String arr="";
  if(math<2<<8){
   arr = Integer.toBinaryString(math);
  }else{
   arr = 1+Integer.toBinaryString(math-89);
  }
  char[] chr = arr.toCharArray();
  for(int i=0;i<chr.length;i++){
   if("1".equals(chr[i]+"")){
    System.out.print(chr.length-i+"ºÅ ");
   }
  }
   
 }
}


Ïà¹ØÎĵµ£º

javaÖÐÒì³£·ÖÀà


1. Òì³£»úÖÆ
      Òì³£»úÖÆÊÇÖ¸µ±³ÌÐò³öÏÖ´íÎóºó£¬³ÌÐòÈçºÎ´¦Àí¡£¾ßÌåÀ´Ëµ£¬Òì³£»úÖÆÌṩÁ˳ÌÐòÍ˳öµÄ°²È«Í¨µÀ¡£µ±³öÏÖ´íÎóºó£¬³ÌÐòÖ´ÐеÄÁ÷³Ì·¢Éú¸Ä±ä£¬³ÌÐòµÄ¿ØÖÆȨתÒƵ½Òì³£´¦ÀíÆ÷¡£
      ´«Í³µÄ´¦ÀíÒì³£µÄ°ì·¨ÊÇ£¬º¯Êý·µ»ØÒ»¸öÌØÊâµÄ½á¹ûÀ´±íʾ³öÏÖÒì³££¨Í ......

java native interface(JNI)¼¼Êõ¼òµ¥Ó¦ÓÃ

      ÊÖÉÏÒ»¸öÏîÄ¿ÐèҪͨ¹ýusb¿ÚÈ¥¶ÁÈ¡usbkeyµÄÐÅÏ¢£¬³§¼ÒÌṩµÄÖ»ÓÐC/C++µÄ½Ó¿Ú£¬¶øÖ÷Ó¦ÓÃÊÇjavaµÄ£¬ËùÒÔÐèҪʹÓÃjavaÈ¥µ÷Óö¯Ì¬Á´½Ó¿â£¬ËùÒÔ»¨Á˵ãʱ¼äÑо¿ÁËÏÂJNI¼¼Êõ£¬jdk¶ÔJNI¼¼Êõ·â×°µÃºÜµ½Î»£¬Ê¹ÓÃÆðÀ´·Ç³£¼òµ¥£¬JNI¼¼Êõ×î¹Ø¼ü»¹ÊÇÔÚÓÚjniÊý¾ÝÀàÐͺͱ¾µØÊý¾ÝÀàÐ͵Äת»»¡£Ïȼòµ¥ÂÞÁÐÏÂJNIµ ......

Java Reflection (JAVA·´Éä)

Reflection ÊÇ Java ³ÌÐò¿ª·¢ÓïÑÔµÄÌØÕ÷Ö®Ò»£¬ËüÔÊÐíÔËÐÐÖÐµÄ Java ³ÌÐò¶Ô×ÔÉí½øÐмì²é£¬»òÕß˵“×ÔÉ󔣬²¢ÄÜÖ±½Ó²Ù×÷³ÌÐòµÄÄÚ²¿ÊôÐÔ¡£ÀýÈ磬ʹÓÃËüÄÜ»ñµÃ Java ÀàÖи÷³ÉÔ±µÄÃû³Æ²¢ÏÔʾ³öÀ´¡£
Java µÄÕâÒ»ÄÜÁ¦ÔÚʵ¼ÊÓ¦ÓÃÖÐÒ²ÐíÓõò»ÊǺܶ࣬µ«ÊÇÔÚÆäËüµÄ³ÌÐòÉè¼ÆÓïÑÔÖиù±¾¾Í²»´æÔÚÕâÒ»ÌØÐÔ¡£ÀýÈ磬Pascal¡¢C ......

ÔÚOracleÏ¿ª·¢Java³ÌÐòµÄ¾­µäÎÊÌâ½â´ð

 
ÎÊÌâÒ»£ºÈç±£¼ÓÔØJDBCÇý¶¯³ÌÐò£º
 
Õý³£ÎÒÃǼÓÔØÇý¶¯³ÌÐòÓÐÈý¸ö;¾¶£º
 
1.Class.forName(String)ÕâÏëµ±ÓÚclassLoaderÒ»¸öStringÖ¸¶¨µÄÀ࣬ÔÚ×°ÔØʱ°Ñ¸ÃÇý¶¯³ÌÐòµÄ¾²Ì¬ÄÚÈݶ¼³õʼ»¯£¬ÆäʵÕâʱÇý¶¯³ÌÐòÀàµ÷ÓÃÁËDriverManager.registerDriver(driver)·½·¨¡£
 
2.ʹÓÃϵͳÊôÐÔ£ºSystem.getPro ......

JavaÕ»Óë¶Ñ

1. Õ»(stack)Óë¶Ñ(heap)¶¼ÊÇJavaÓÃÀ´ÔÚRamÖдæ·ÅÊý¾ÝµÄµØ·½¡£ÓëC++²»Í¬£¬Java×Ô¶¯¹ÜÀíÕ»ºÍ¶Ñ£¬³ÌÐòÔ±²»ÄÜÖ±½ÓµØÉèÖÃÕ»»ò¶Ñ¡£
2. Õ»µÄÓÅÊÆÊÇ£¬´æÈ¡ËٶȱȶÑÒª¿ì£¬½ö´ÎÓÚÖ±½ÓλÓÚCPUÖеļĴæÆ÷¡£µ«È±µãÊÇ£¬´æÔÚÕ»ÖеÄÊý¾Ý´óСÓëÉú´æÆÚ±ØÐëÊÇÈ·¶¨µÄ£¬È±·¦Áé»îÐÔ¡£ÁíÍ⣬ջÊý¾Ý¿ÉÒÔ¹²Ïí£¬Ïê¼ûµÚ3µã¡£¶ÑµÄÓÅÊÆÊÇ¿ÉÒÔ¶¯Ì¬µØ·ÖÅä ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ