System.out.ptintln(\} }
Public static void main(String []args){ Aclass a=new Aclass(); Aclass a1=new Bclass(); a.go(); a.go(); }
}
ÒÔÉϳÌÐòÔËÐнá¹ûÊÇ£¨£©
A.Aclass B.Bclass Aclass Bclass C.Aclass D.Bclass Bclass Aclass 15. ·ÖÎöÒÔϳÌÐò Public class Test{
static void leftshift(int i,int j){
I<<=j; }
Public static void main(String []args){
int i=4,j=2; Leftshift(i,j);
System.out.println(i); } }
¸Ä³ÌÐòµÄÖ´Ðнá¹ûÊÇ£¨£© A.2 B.4. C.8. D.16
¶þ¡¢Ìî¿ÕÌâ
1¡¢£¨16-33£©¡¢ÏÂÃæµÄ³ÌÐòµÄ¹¦ÄÜÊÇ´Ó1~36µÄÕûÊýÖÐËæ»úѡȡ7¸öÊý£ºµÚ1´ÎËæ»úÑ¡Ôñ1~36ÖеÄÒ»¸öÊý£¬µÚ2´Î´ÓʣϵÄ35¸öÊý£¨µÚ1´ÎÑ¡ÖеÄÊý²»°üÀ¨ÆäÖУ©ÖÐËæ»úÑ¡ÔñÒ»¸öÊý£¬¡,ÖØ¸´Õâ¸ö¹ý³Ì£¬Ö±µ½Ñ¡ÖÐ7¸öÕûÊý¡£ÇëÍê³É³ÌÐòÌî¿Õ¡£
import java.util.*;
public class Select7From36 {
public static void main(String[] args) { Random rd= new Random();
ArrayList allNum=new ArrayList(); //´´½¨ÓÐ7¸öÔªËØµÄIntegerÊý×é Integer result[]=____(1)____; int x;
for(int i=1;i<=36;i++){
allNum.add(new Integer(i)); }
for(int i=0;i<=6;i++){ x=____£¨2£©____;
result[i]=(Integer)allNum.get(x); allNum.remove(x); }
for(int i=0;i System.out.print(result[i]+\ \ } } } Èý¡¢³ÌÐòÔĶÁÌâ 1¡¢£¨16-36£©ÔĶÁÏÂÃæµÄ³ÌÐò´úÂ룬²¢»Ø´ðÎÊÌâ¡£ String s1=new String(\ String s2=new String(\ boolean b1=s1.equals(s2); boolean b2=s1==s2; System.out.print(b1+\ \ ?³ÌÐò¶ÎÖ´Ðкó£¬ÔÚÃüÁîÐеÄÊä³ö½á¹ûÈçºÎ£¿ ?½âÊÍÊä³ö(1)µÄ½á¹ûµÄÔÒò£¿ ËÄ¡¢±à³ÌÌâ 1¡¢±àдÁ½¸öÀ࣬ÆäÖÐÒ»¸öÀàÉùÃ÷˽ÓгÉÔ±±äÁ¿£¬²¢Í¬Ê±ÉùÃ÷¹«¹²·½·¨·ÃÎÊ˽ÓбäÁ¿£»ÁíÒ»¸öÀàÖÐʹÓÃÕâЩ¹«¹²·½·¨¡£ 2¡¢±àдһ¸ö³ÌÐò£¬½«Êý×é×÷Ϊ²ÎÊý´«¸øÒ»¸ö·½·¨£¬¸Ã·½·¨½«Õâ¸öÊý×éµÄÔªËØÈ«²¿ÏÔʾ³öÀ´¡£ 3¡¢ÏÖÔÚÊäÈën¸öÊý×Ö£¬ÒÔ¶ººÅ·Ö¿ª£¬·ÅÈëÒ»¸ö×Ö·û´®ÖУ¬È»ºó°´ÉýÐòºÍ½µÐòÅÅÐò£¬²¢ÏÔʾÅÅÐò½á¹û¡£ Á·Ï°ËÄ Ò»£®³ÌÐòÔĶÁÌâ 1¡¢£¨16-37£©¡¢ÔĶÁÏÂÃæµÄ³ÌÐò£¬²¢»Ø´ðÎÊÌâ¡£ import java.io.*; public class Test { public static void main(String args[]) throws IOException { BufferedReader buf=new BufferedReader( new InputStreamReader(System.in)); while(true) { String str=buf.readLine(); if(str.equals(\ break; int x=Integer.parseInt(str); System.out.println(x*x); } } } ±àÒëÔËÐÐÉÏÃæµÄ³ÌÐò£º ?´Ó¼üÅÌÊäÈë10£¬»Ø³µºóÊä³öµÄ½á¹ûÈçºÎ£¿ Êä³ö200 ?´Ó¼üÅÌÊäÈëexit£¬»Ø³µºó³ÌÐòÄÜÕýÈ·Ö´ÐÐÂð£¿ÎªÊ²Ã´£¿ NumberFormatException 2¡¢£¨16-38£©¡¢Ð´³öÏÂÃæµÄ³ÌÐò±àÒë¡¢ÔËÐкóµÄ½á¹û¡£ public class Test{ public static void main(String args[]) { new Student(\ new Student(\ new Student(\ System.out.println(\ Student.print(); } } class Student { protected String name; protected char sex; protected int chinese; protected int english; protected Student next; static Student list; Student(String name, char sex, int chinese,int english) { this.name=name; this.sex=sex; this.chinese=chinese; this.english=english; this.next=list; list=this; } static void print() { Student friend=list; if(friend==null)
Ïà¹ØÍÆ¼ö£º