How do I get SUN's SCJP certification?

zhaozj2021-02-17  59

SCJP was originally easy to take, but I was first 59% for the first time, depressed! 1250RMB silver! Don't you have the mistakes of the doll! Think of SCJP's buddies, you can go in to see my experience. . . . . . .

Sun's SCJP qualification certificate, I want to say that you are not difficult! Why is my life so bitter! ! ! ? ? ? Sun Java programmer certification. I finally got him now! In the middle, I have a big discount, I have taken 2 times. Pass! For the first time, 59%, on January 6th, the difference is PASS, which may be even luck. It was not difficult to take this certificate, and the high score may be difficult, but I will give me 1 question. It is also this 1 question. I have to be 1250RMB, because Sun's test cost is 1250RMB, a mobile phone is gone! So I was examined again on January 12, I have to go to the SUN center to buy his exam coupons, and use cash is inconvenient. He is asking for remittance, you will be the best to call the Sun center before, (I first Saimary coupons, 850RMB, did not bought in Beijing, Drag Shanghai buddy! FAINT! Actually 1 question! I used to see a buddy in this, and he also said that Siles 3 minutes! I am not silently, take the hot iron to test! I believe that I will be able to live!) But I still have a little relaxing, the result is over! Finally, I finally made a breath. I got a training course in November 2001, and later I took the SL-275 books over again, and I did 6,7 sets of analog. I have met a lot of original questions, but I have a good idea of ​​OO's programming section, Java's ideological part, for example, overload, coverage, multithreading, etc., is about IO part, there are many formats Bare, the component IO part in the examination questions! Now I can have some simple programs, but the real development is far away, I want to buy a few books in Java, improve. I can't explain what I can't tell, I want you to master C, so everyone work together! If you think you have mastered the Java's Class design and the advanced class design and basic syntax, then borrow some of IO and UTIL's stuff, you will go to the exam! I am sure you can live! Java's garbage collection is not difficult, anyway, I am 100%. Read more when you read the program! Java sometimes tests fine! The simulation questions should be done, don't be too much, it is recommended to do the following places "5 sets of mode questions, it seems to be the topic of selling Bible people, there are two sets of Chinese in the answer." Look "by the way Some people recall more more than 20 topics "(in http://my-wjl.scu.edu.cn/~xxuzi/, go to find the download!), I have almost these 20 times in the first exam. question! ! ! But I didn't see it before the test! My SL-275 is relatively early, and some content is not familiar. It is strongly recommended that you have a good time before you take it! ! ! Master the basic Java thought! This is also an explanation of learning Java for a while. I learned Java, equal to the M $ newly launched C # language. The two are similar. In the future it is their world. It is strongly recommended that everyone goes to the place, there are a lot of true questions in my 2 exams! Http://my-wjl.scu.edu.cn/~xuzi/ There are too many Dongdong, choose the right you, no need to see!

The following is the story of the challenge of others, and I hope everyone will pay attention! ! ! Sun's SCJP question bank is very small. Some people say it. It is true. If you have done a few Mock Test, you may encounter the true articles and have problems encountered in some forums. It is also very easy to meet me. Some topics, many questions, many people recently mentioned the true question in the forum 1. Class A {public void main (String [] args) {system.out.println ("Hello World.");}} What is it? This question is everyone. If there is no Static, compile, RUN throws Exception! 2. String [] a = new string [20]; // If you change String to WAPPER CLASSES or Primitive, compile error: not compatible type! INT i = 3; string b = a [3]; // b = NULL output B is? Is NULL! This is also simple. In my first test, there is such a program: String s = new string ("abc"); // This can also be replaced with: string s = "hij"; s = "def"; Compile and Run are all correct! This is possible to change the String instance variable. I thought that the String class was immutable, I think it can't compile success, and the result is of course wrong! // sigh3. The current directory of the hard disk has a file "a.txt", there are some junk OutputStream o = new fileoutputstream (New file ("a.txt"); then what happened? A.TXT becomes 0 bytes, this is the last test point of IO? Go check the IO related knowledge points! 4. Single selection A.GridbagLayout's Component Either in a grid change the size of the frame to keep the Perfect size in the middle of the lattice. B.frame's North position is a good location in the menu. I don't remember D. I don't remember that I and B are wrong, and Component can be left and down, and so on. Frame is added with setmenubar supplement: GridbagLayout's related features often appear in the exam, the teacher did not mention it, pay attention to take it in the appendix of the SL-275! Comparison with several other Layout.

Investment and information, will you put it? 5. About Thread, many people say that Thread test, and difficult, maybe I didn't encounter a problem, thread part I didn't go wrong Class a imports runnable {private int x; private int y; public void Run () { For (;;) {x ; y ; system.out.println ("x =" x "y =" y); system.out.println (current Thread's name);}}} Class B {public static Void main (string [] args) {a aa = new a (); new thread (aa) .start (); new thread (aa) .Start ();}} gives you to ask your results Supplement: The correct answer to this question is --- It is possible to output the result of x! = Y and the output is displayed is running in two threads! Will not appear the same X and Y value! The following is also a similar question, you can see which one should you choose? *********************************************************** class Happy implements Runnable {private int x; private int y; public synchronized void run () {x ; y ; System.out.println (x "" y);} public static void main (String args []) {Happy That = new happy (); (); new thread (there)). start ();}} What happens when this code compiles and run? a) Will Print X, Y in ORDER 11 22B) WILL Print X, Y TWICE IN ORDER 11 22 11 22C) Will Print X, Y ORDER IS Unpredictable.e) Compiration Error.f) Runtime Exception. **** *********************************************************** ***** 6. It's very happening. The top question has changed again, and there is ahead of my test //, the previous synchronized (this) {x ; y ;} system.out.println ... // Also give you a few options, ask the result of this is synchronized, the above may output the result of x! = Y, this will not! Everyone should pay attention to 5, 6 has only one AA, that is, the same x or y. Supplement: The correct answer is ---- always output x = y and output is displayed two threads run! Will not appear the same X and Y value! If the THREAD constructor is not just an AA, that is, another use of a NEW again, one instance bb, and new thread (bb) .Start ();, then the result is not the same! There will be the same X and Y value! (5 and 6 I have encountered the first examination questions, the second time, there is also! Sun question bank will appear often, I wish you good luck!) You can take the full procedure I offer to verify it! // Everyone will run the comment out and the undeiled program!

*********************************************************** ****** Public class testthread {public static void main (String args []) {xyz r = new xyz (); // xyz p = new xyz (); thread t1 = new thread (r); Thread T2 = New Thread (r); // Thread w1 = new thread (p); // thread w2 = new thread (p); t1.setname ("thread_t1"); t2.setname ("thread_t2"); // w1 .setname ("Thread_W1"); //w2.setname ("thread_W2 "); t1.start (); t2.start (); //w1.start (); //w2.start ();}} Class XYZ IMPLEMENTS Runnable {Private INT I; Private Int J; Public Void Run () {// Synchronized (this) {While (TRUE) {IF (i == 100) {Break;} System.out.Println ("i = " i ", " " j = " j ); system.out.println (thread.currentthread (). getName ());} //}}} ************ ********************************************************************************************** Classic Thread questions, also true questions, thread1synchronized (a) {synchronized (b) {}} thread2sychronized (b) {synchronized (a) {}} all (); ask results, result is - uncertain! May be DEADLOCK, and the results are related to the environment of the current DHREAD! That is, everyone is very common, the questions A, B are StringBuffer (); Thread1, 2 is use new thread () {public void run () {// ....}}. Start (); way defined, word constant.

The real program is as follows: ************************************************************* *********** PUBLIC CLASS SYNCTEST {public static void main (string [] args) {final stringbuffer s1 = new stringbuffer (); final stringbuffer s2 = new stringbuffer (); new thread () {public () {public Void Run () {synchronized (S1) {s1.append ("a"); synchronized (S2) {s2.append ("b"); system.out.print (S1); System.out.Print (S2) ;}}}} .Start (); new thread () {public void Run () {Synchronized (S2) {S2.Append ("c"); synchronized (s1) {s1.append ("d"); system .out.print (S2); System.out.print (S1);}}}} .Start ();}} / * Which Two Statements Are True? (Choose TWO) A. The Program Prints "Abbcad" B. The Program Prints "CDDACB" C. The Program Prints "ADCBADBC" D. The Output Is A Non-Deterministic P Oint Because E. The Output IS Dependent on The Threading Model of The System The Program Is Running on. * / *********************** ********************************* The correct answer is: D and E! Based on the uncertainty called by the procedures process and threads (same priority), this program may output A and B. But you should notice that the two threads 1 and 2 lock the lock order is inconsistent, also That is, it may cause a deadlock.

If you actually run the above program, you will find the result of the output may always "abbcad", which is actually possible "CDDACB"! This is related to the current Java virtual machine's running environment! You can't add anything other Thread, so what you see is like only A answer! But my run results are - mostly A situation, there is less than the case, huh, huh! try it yourself? This question I have encountered two exams, you can also encounter! Do not believe? I bet with you, what? Of course, please ask me to eat, huh, huh! It seems that there is no other subject pattern about Thread in the SUN SCJP question bank! When you encounter this question, the answer doesn't have to look, and you will choose D and E good! 8.int i = 0, j = 5; bk: for (;;) {i - for (;;) {IF (i> j -) Break bk;}} ask i, j is equal to what? Pay attention Yes, I - only running a complement: this type of topic you will definitely come! But it seems that every time the content is still different, you have to read the program carefully! I can't see the familiar subject, I forget that I will go to the answer, each answer is not the same! I think the sun about this type of content is easy to change, and the top of the THREAD is not good! 9.class a {integer u () {return new integer (4);}} class b extends a {long u () {return new long (8);} public static void main (string [] args) {.. Question results, the result is that the compilation is not good, the return value of the Override method must be the same! Supplement: The three aspects of Override must be exactly the same! Overloading is the parameter imported parameters must be different, its return value can be different! This type of theme is definitely taking it! The way may not be the same, but the point to grasp the above will not be wrong! 10. How do I define a way to can't be inherited? Give you a few options, you want to choose two, there is static void xx () {} final static void xx () {} final void xx () {} I have the title in the lang fund, it won't be This is this? I chose the last two, but also saying static void xx () {} no choice but the Static method can not be inherited, the people have been inherited. I can tell you very much. If you don't know, you are not clear or yourself. Read the book. Basically there are. 11. This reminds me of Static Inner Class, INNER CLASS can not be used in STATIC to be modified. It is also true that Static Inner Class is not regular. In fact, everyone understands what Static Inner Class, and this is said that everyone knows, I think people who have a bit of death are a bit boring.

People who write Sun exams think that there is one of the following questions is the radio INNTER CLASS CAN Be Publican INTER CLASS Can Be Public ......................... ... static ............................ privated ................. ........... protected here, because the topic of the top question (not option) appears in the topic of the top question (not an option), and STATIC also appeared in the test point given by Sun Inner Class Supplement: There are more chances in this question! Be sure to clear the features of the Inner Class, especially the related features of Anonymous Inner Class, very important! There is also the main features of Abstract Class and Interface Class! And advanced classes such as Static, Final! ! ! Find a basic idea! Sun is often tested, do not believe, you are waiting to be good. This part can take a closer look at the relevant part of my_notes! Look more, it is best to come down! 12. One question is ... Unsigned byte i = 20; ... should be selected without passing 13. What is the range of a super-intensive CHAR? (Correct is: 0-65535) 0-3xxx0-65535-128-127 ... Note XXXX makes me used to represent the number, the number of sun is determined, not x supplement: there is a range of Byte - 128 ~ 127! INT will also be admitted! 14.class a {public string toString () {return "4"}} class b extends a {public string toString () {return super.tostring () "3"; // is called the method in the parent class ! There are similar procedures on the 275 book. Public static void main (string [] args) {system.out.println (new b ());}} Question output, the title of "43" 15.sun is very deducted by Java Test AB CCLASS TEST {Pubic Static void main (string [] args) {string k1 = args [0]; string k2 = args [1]; string k3 = args [2];}} how much is you K3? I got a look at the topic, and I was so simple 16.class aimplements runnable {public void run () {system.out.println ("abc");}} Ask you how to print ABC in a New Thread You can see the wrong options that you can see, but I still have to look at it: Make Thread's instance starts to run the run state to call its START () method.

17. Take the constructor of the RandomaccessFile, ask how to write a file cloud a. ... randomaccessfile (xxx, "r") b. .................... ..., "w") c. ....................... "" rw ") d. ........ ............... "" x ") Select c. The real test questions are as follows: ********************** ********************************* FILE F = New File ("aa.txt"); Suppose this file exists In Your Directory.Which of The Following Can Be Used to Write a Line? a. randomaccessfile f1 = new randomaccessfile (f, "r"); b. randomaccessfile f1 = new randomaccessfile (f, "a "); C. Randomaccessfile f1 = new randomaccessfile (f," rw "); d. Randomaccessfile f1 = new randomaccessfile (f," w "); e. Randomaccessfile f1 = new randomaccessfile (f," wr "); ** *********************************************************** ***** 18. A frame of a test layout, using setLayout (new borderlayout ()); // seems to be SUN questions I am afraid that you forget Panel P = new panel () B1 = New Button (); p.Add (b1); add (p, north); Button B2 = New Button (); add (b2, south); .... Ask you the north side, the southern side Button is much, is it as big? When Frame Resize is ... Waiting for my addition: the running source is as follows: *************************** *********************** Import java.awt. * Public class frameexample {private frame f; Private panel p; private button b1; private frameexample () {f = new frame ("Hello Out there!"); p = new panel (); b1 = new button ("Button One"); B2 = New Button ("Button Two");} public void launchframe () {f.setsize (170, 170); f.setBackground (color.blue); P.setsize (80, 80); P.SetBackground (color.green); P.Add (b1); f.Add (p, "north"); f.Add (b2, "south"); f.setVisible (true); // Can be replaced with F.SHOW (); the effect is the same!

//f.setLayout (New FlowLayout ()); // Make this also executed, you look at the results! This reflects that the setLayout () method brings different results in the procedural //. } Public static void main (string args []) {frameexample guiwindow = new frameexample (); guiwindow.launchframe ();}} ******************************** ******************************** 19.java.io.PrintStream P = New Java.io.PrintStream (New Java) .io.inputstreamReader (System.out)) To choose Import XXX or not IMPORT below is a similar question, which one do you see? ***************************************************** // CodeClass Happy {public static void main (String args []) {PrintWriter p = new PrintWriter (newjava.io.OutputStreamWriter (System.out));}}? Which statement can be placed in // code to make this program work a) import java.io.PrintWriterb) import java.io.OutputStreamWriterc) include java.io.PrintWriterd) include java.io.OutputStreamWritere) import java.io.PrintWriter import java.io.OutputStreamf) no need to do anything. **** **************************************** 10. Abnormal! Catch can have multiple, but must ensure that "reverse" is an abnormal subclass, and if there is a parent class, the compilation will pass. 1. If an abnormality is thrown in the method, it is necessary to throw it again in the method. Public static void methoda () throws exception {throw new oException ();} 2. If the Catch block is not possible to capture an abnormalization, compile will be wrong. 3. If trying corresponds to multiple Catch blocks, the program will look for the first matching block, then jump directly to Finally (if any). For other blocks will not work.

*************************************************** Import java.io .IoException; public class a {public static void main (String [] args) {Try {methoda ();} catch (ioException e) {// remove this Catch program can run the result normally! System.out.println ("caught oException");} catch (Exception E) {// Remove this Catch program but does not run the result normally! Because the abnormality captured in Catch must be uniform with the method declaration //! Although the method throws in the body is its sub-abnormality, if only the abnormality is unusual, // is compiled! TRY IT OUT! System.out.println ("caught exception");}} public static void methoda () throws exception {// method throws an exception, but the method declaration is still needed again! // Throws Exception here must not miss it! ! ! THROW new oException ();}} **************************************************************************************************************************************************************************************** **** Do you see which one of the following? Run a check of each answer option, think about why? Import java.io. *; class excep {static void method () throws exception {throw new EOFEXCEPTION ();} public static void main (string args [);} catch () {}}} Which of the following should be placed at so thatthe code will compile without errors? a. IOException eB. EOFException eC. MalformedURLException eD. NullPointerException eE. Exception eF. FileNotFoundException the following summary is completely even their own stuff! I hope everyone will pay attention! 1. Look at the following procedure! Think about the result of the output? Or compilation error? This is the one in my test questions, I thought too much, and the result was wrong! But in fact it can be compiled and output results: 1. Class a {static void method (int [] a) {INT j = 1; a [j] ;} public static void main (string args []) {int [] b = new int [5]; method ( b); System.out.Println (B [1]);}} 2. The following also appeared in my test, but now I don't know if it is correct, and the topic is also forgotten. The program is probably as if you ask, a. Class Mycircle can be completely packaged. B. The diameter of the circle is always twice the radius. C.Method (double RADIUS) should be added to SYNCHRONIZED to ensure that the diameter of the circle is always twice the radius. D. This program returns the correct radius value. It is probably like this. . . .

If you encounter a correct answer, ok? This is the full program of topics (newly added !!!) 1. Public class mycircle {2. Private Double Radius; 3. Private Double Diameter; 4. 5. Public void setRadius 6. this.radius = radius ; 1. Diameter = radius * 2; 8.} 10. Public double getradius () {11. Return Radius; 12.} 13.} a. The mycircle class is full encapsulated.b. The Diameter of a Given MyCIRCLE is guaranteed to be twice its radius.C. Lines 6 and 7 should be in a synchronized block to ensure encapsulation.D. the radius of a MyCircle object can be set without affecting its diameter. this option is the correct answer is B title !

3.Try {system.exit (0); finally {system.out.println ("hello");} How to execute? Is it a HELLO? NO! Finally is not executed at this time! Why? Go see the abnormalities in the book. Finally is not always performed. 4. CAUSE A THREAD to STOP is as follows: SLEEP (); stop (); yield (); wait (); synchronized (); EXITS SYNCHRONIZED CODE; InputStream AccessNo Stop A Thread The conditions are as follows: Notify (); NotifyAll ); setPriority.5.Static Inner Class instantiation method is as follows: 1.outer.inner INN = New Outer.inner (); 2.outer o = new outer (); Outer.INNN = O. NEW inner (); non-Static Inner Class instantiation method is as follows: 1.outer o = new outer (); Outer.inner Inn = O.New Inner (); 2.outer.inner Inn = New Outer () .new inner (); 6. Please check the relevant part of the My_NOTES or JDK documentation! Familiar! I met when I exam.

Object getSource (); // This method returns Object, not Component! And Component getComponent, Container getContainer, does not confuse! Pay attention to their meaning; int GETX (), int gety (), Int getId () // is what is the return? The knowledge points attention to some of the IO are as follows: getName (), getParent (), getpath (), getabsolutepath (), // What does it mean? File, FileInputStream (), FileOutputStream (), DataInputStream, DataOutstream, InputStreamReader, how many constructor parameters in OutputStreamwriter? These are often tested! FileOutputStream (file name, whether the append-> parameter is "true" or "false") if true, Write to End, add it at the end, otherwise it is overwriting override! FileWriter (file name, boolean parameter is append-> parameter is "True" or "false") PrintWriter (Writer out, boolean autoflush "meaning? Randomaccessfile (file, "r" or "rw") Boolean isDirectory (), boolean isabsolute (), boolean exissrs () // is what does it mean? ? ? Features of Inner Classes and Anonymous Inner Classes? 7. Be sought to distinguish an important feature of Java in the exam: Pass-by-value !!! Use the value to pass the parameters, what circumstances are changed? This knowledge point is much better! ! ! Look at the questions below, do you want to see which one? What Will Be Printed WHEN FOLLOWING CODE RUNS? 1. Class foo {2. Static void change (string s) {3. S = s.Replace ('j', 'l'); 4.} 5.6. Public static void main (String args []) {7. String s = "java"; 8. Change (s); 9. System.out.println (s); 10.} 11.} A. Compiler errorb. Will Print Lavac. Runtime execution order exceptionD. Will print java8.JAVA program ??? a difficult but a fundamental question, please observe carefully. Before any object is constructed the object of the parent class is constructed (as there is a default call to the parent '

. When s constructor from the constructor of the child class via the super () statement) Also note that when an object is constructed the variables are initialized first and then the constructor is executed any JAVA object is instantiated, the first step: give Example variables are classified by class variables, and the initialization assignment of the Static variable and the STATIC block code are run, and then enter the code block of the object constructor. Step 2: After entering the code block of the constructor, prior to call or explicitly call the parent class constructor. When performing the parent class constructor, it is also based on the current step, both give the parent class. The instance variable is assigned the default value, and the initialization assignment of the parent class and the operation of the parent class code, and then enter the code block of the parent class's object constructor, execute the subsequent code line; if the parent class is still The last level of the constructor is required, then call the parent class constructor of the parent class, so that until it is called to the object of the Object. Step 3: After performing the constructor of the completed Father class, then give the local instance variable to the initial value, then enter the local constructor code block, then perform the line of code in the subsequent constructor. At this point, an object is instantified! During the process of the parent class constructor, if you want to call and rewrite the same name with the subclass, you should also notice the dynamic binding of the Java program. At this time, the parent class call is a method of renovating the parent class in the subclass. , Not a parent class local method! 9. Override method To check two points! 1. Cannot be more accessible than it rewritten! 2. Do not allow more exceptions than it overwritten! This knowledge point Sun is more ! Read it carefully when you read the program! 10. Below this question can help you understand the running mechanism of the thread! I have encountered when I exam. Ask you, what is the value of the output i? Is 10 or 999? The answer is: may be 10 or 999, not necessarily certain! Rely on its environments that do it. You can try to run N times.

Class Xyz Implements Runnable {Static Int i = 10; Public Void Run () {i = 999;} Public Static Void Main (String Args []) {XYZ R = New XYZ (); Thread T = New Thread (r); T.Start (); system.out.println ("i =" i);}} 11. The following is a TIPS in SUN's SCJP test software, I want to be a bit! Quick Revision Tips 1. An identifier in java must begin with a letter, a dollar sign ($), or an underscore (-); subsequent characters may be letters, dollar signs, underscores, or digits.2 There are three top-. Level Elements That May Appear in A File. None of these elements is required. If the isy the following order: -package declaration ??????? -import statements ?????? ? -class definitions? 3. A static method can not be overridden to non-static and vice versa.4.The variables in an interface are implicitly final and static.If the interface, itself, is declared as public the methods and variables are implicitly public.5.A final class can not have abstract methods.6.All methods of a final class are automatically final.7. While casting one class to another subclass to superclass is allowed without any type casting. eg. A extends B, B b = new a (); is valid but not the reverse.8. The string class in java is immutable. Once an instance is created, The STR ING STRINS CANNOT BE CHANGED STRING S1 = New String ("test"); S1.CONCAT ("Test1"); Even AfTer Calling Concat () Method On S1, The Value of S1 Will Remain To Be "Test". What act is a new instance is created. But the stringbuffer class is mutable.9. The short circuit logical operators && and ipe @ @ Boolean Types and Unlike & Unlike & Unlike & Unlike &

and |, these are not applicable to integral types The valuable additional feature provided by these operators is the right operand is not evaluated if the result of the operation can be determined after evaluating only the left operand 10. The difference between x = .. y; and x = y ; in the first case y will be incremented first and then assigned to x in second case first y will be assigned to x then it will be incremented.The initialization values ​​for different data types in java is as. Follows? Byte = 0, int = 0, short = 0, char = '/ u0000', long = 0L, float = 0.0f, double = 0.0d, boolean = false, Object Reference (of any object) = NULL. 11. An overriding method may not throw a checked exception unless the overridden method also throws that exception or a superclass of that exception.12. Interface methods can not be native, static, synchronized, final, private, protected or abstract.13. The string class is a final class, it can't be subclassed.14. The Math Class Has a Private Cons Tructor, IT CAN '

t be instantiated.15 The two kinds of exceptions in java are:.. Compile time (Checked) and Run time (Unchecked) exceptions All subclasses of Exception except the RunTimeException and its subclasses are checked exceptions Examples of Checked exception:. IOException, ClassNotFoundException .? Examples of Runtime exception:. ArrayIndexOutOfBoundsException, NullPointerException, ClassCastException, ArithmeticException, NumberFormatException.16 The various methods of Java.lang.Object are clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString and wait.?17. Garbage collection in java can not be forced. The methods used to call garbage collection thread are System.gc () and Runtime.gc (18). Inner class may be private, protected, final, abstract or static.19. An example of creation Of Instance of An Inner Class from Some Other Class: Class Outer {??? Public Class Inner {}} Class Another {??? public void amethod () ??? {??????? Outer.inner i = New outer (). new inner (); ???}} 2 0. The range of Thread priority in java is 1-10 The minimum priority is 1 and the maximum is 10. The default priority of any thread in java is 5.21 There are two ways to mark code as synchronized:... A) Synchronize an entire method by putting the synchronized modifier in the method's declaration. b.) Synchronize a subset of a method by surrounding the desired lines of code with ({}). 22. The argument curly brackets to switch can be either byte, short, char or int.23 Breaking to a label (using break ;).. means that the loop at the label will be terminated and any outer loop will keep iterating While a continue to a label (using continue ;

转载请注明原文地址:https://www.9cbs.com/read-29207.html

New Post(0)