java programming questions and answers for written test
java programming questions and answers for written test
Discover java programming questions and answers for written test, include the articles, news, trends, analysis and practical advice about java programming questions and answers for written test on alibabacloud.com
Java concurrent programming test (3)Generate more alternate operations
Because errors in concurrent code are generally low-probability events, you need to execute these errors multiple times during testing. However, some methods can increase the probability of discovering these errors, as mentioned above, in a multi-processor system, if the number of processors i
} the /*************extends**********************/ - Wu - Public classTestmemo { About $ Static intAddintAintb//The reentry of a function - { - return(A +b); - } A + Static intAddintAintBintC//The reentry of a function the { - return(a+b+c); $ } the the Static DoubleAddDoubleADoubleb//The reentry of a function the { the returnA +b; - } in Public Static voidMain (string[] args)//The reentry of a function the {
,account to,int amount) {from.setbalance (from.getbalance ()-amount ); if (Random.nextint (>threshold) {Thread.yield ();} To.setbalance (To.getbalance () +amount);}Performance TestingPerformance testing should conform to the current application scenario, ideally reflecting the actual usage of the object being tested in the application.The second goal is to adjust the various limits based on experience values, such as the number of threads, cache capacity, and so on, which are dependent on the pl
This is written in the test program that is used in the back datagram program, which includes a set of custom events, a Java bean component that can scroll through the display image.
In object-oriented program design, event messages are the basic means of communication between objects. In a graphical user interface program, GUI component objects generate various
the application.
4, the level of competition is not true
Different levels of shared data and execution of local computing will show a different level of competition, with different performance and scalability
5, the elimination of useless code
The compiler may delete code that is meaningless or does not produce results or predictable results
Make the results as unpredictable as possible
Iv. Other test methodsCode
The first code runs the resultfunction: Sum from 1 to 5305The result of the second code runCode HostingThe result of the third code run(1) The name of the source file is Person.java(2) Generate 2 byte-code files, named Person.class and Xiti.classBecause I did not finish my first week of work, I did not complete the test task on time because I had a lot of time to play the code during the test, and I was fam
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.