java coding interview questions and answers

Want to know java coding interview questions and answers? we have a huge selection of java coding interview questions and answers information on alibabacloud.com

Microsoft Interview Questions and answers-abnormal but classic (answer)

From: http://topic.csdn.net/u/20070315/10/78d03595-b5fa-4853-ab02-37ed16c2ddb3.html Answers to the first group: 1) three ropes, the first ignition, the second ignition, and the third ignition After the first rope is burned (30 minutes), the other end of the second rope is ignited. After the second rope is burned (45 minutes), the two ends of the third rope are ignited, timing is complete after the third rope is burned (1 hour 15 minutes) 2) According

Answers to one of Google's interview questions about weighing 8 balls

One of Google's interview questions: there are eight balls of the same size, 7 of which are of the same weight, with a slightly heavier one. How can I use the balance to determine which ball is heavier only twice? Answer:For the first time, I took out 6 of them and placed them on the balance, each weighing 3. I can determine where the heavier one is. There are three situations: 3 on the left of the balance

20 Linux Command Interview Questions and answers

20 Linux Command Interview Questions and answersQ: 1. How can I view the running level of the current Linux server? A: the who-r and runlevel commands can be used to view the running level of the current Linux server.Running level:0-downtime (do not set initdefault to 0) 1-Single User Mode 2-multiple users, but there is no NFS3-full multi-user mode 4-5-X116-Restart not used (do not set initdefault to 6) Q:

PHP Interview Questions and answers (1)

1. Use PHP to print the previous day in the format of 22:21:21 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->// Echo date ('Y-m-d H: I: s', time ()-60*60*24Echo date ("Y: m: d H: I: s", strtotime ("-1 day "));?>2. Differences between echo (), print (), and print_r ()ECHO is a language structure with no returned values;The print function is basically the same as the ECHO function. The difference is that print is a function with a return valu

Php interview questions and my answers (1)

is a function and has a return value. print_r is a recursive print that outputs array objects. 3. templates that can be used to split HTML and PHP So much, in fact, PHP itself is a template engine, I used smarty, common also PHPLib, FastTemplate, Savant here has a template engine list: http://www.sitepoint.com/forums/showthread.php? T = 123769 4. How to Implement PHP and JSP interaction? The question is a bit vague. SOAP, XML_RPC, Socket function, and CURL can all achieve this. If PHP and

Oracle classic Interview Questions and answers

Typical questions and answers from Oracle 1. Explanations of differences between cold backup and hot backup and their respective advantages answer: Hot Backup is applicable to databases in archive mode when the database is still working. Cold backup refers to the backup after the database is closed, applicable to all databases. The advantage of hot backup is that the database can still be used during Backup

Typical questions and answers for the test interview-Continuous updates

Interview Questions (1 ):Connect n numbers to obtain the smallest or Largest Integer (Baidu exam) Description: There are n positive integers connected into a row to form a minimum integer.Program input: N countProgram output: Multi-digit join For example:When n = 2, the minimum integer connected by two integers 32,321 is: 32132,When N = 4, the minimum integer of the four integers, namely, 55, 31, 312, and

Favorite Interview Questions and answers

This interview questions2344095 (caring)SortAshzs (can contain Chinese characters ))Thank you! 1. There are 14 200 GB disks on the ark, and the database size includes log files. How to set the disk (which indicates how the 14 disks are used )?2. there are two Server Clusters, node1 and node2. Now we need to install win200 system patches. After the patches are completed, we need to restart the system. How to install the patches does not affect the user

Detailed answers to innovative factory interview questions: how many fish have been played

Recently I saw an interview question from an innovative factory, which is very interesting. The following shows the Algorithm Implementation (Java code ). If you have a better algorithm, follow the instructions. ABCDE five-member fishing and sleep. A wakes up, throws one fish, divides the remaining fish into five points, and takes one copy. B wakes up and throws one, divide the remaining parts into five po

Three major SSH frameworks-spring, hibernate, and Struts Interview Questions (including answers)

Document directory How does hibernate work and why? How does hibernate delay loading? In hibernate, how does one implement the relationship between classes? (For example, one-to-many and many-to-many relationships) Let's talk about the cache mechanism of hibernate. Hibernate query method How to optimize hibernate? Struts working mechanism? Why use struts? How is the struts validate framework verified? Let's talk about the struts design model. Why does spring work? How does hibernat

Interview Questions (including answers) for spring, hibernate, and struts)

How does hibernate work and why?Principle:1. Read and parse the configuration file2. Read and parse the ing information and create sessionfactory3. Open sesssion4. Create transaction Transation5. Persistent operations6. Submit the transaction7. Disable session8. Disable sesstionfactory Why:1. The code for JDBC database access is encapsulated, which greatly simplifies the tedious and repetitive code at the data access layer. 2. Hibernate is a mainstream persistence framework based on JDBC and an

Java interview questions, Java interview questions

Java interview questions, Java interview questionsInterview is something that everyone has to go through. Most people have more than one interview. Here we will summarize the latest interview

Interview questions 1--java exception and error face questions 10 Ask 10 answer __java

English Original: Java Exception and Error interview Questions Answers In the Java Core Knowledge interview, you always encounter questions about handling exception and error. Exceptio

Dedicated to 2018 still struggling Java programmer, Java common face questions and answers!

"). Append ("World"). Append ("I love You"); This time S has more than one string to splice, it is supposed to be a number of objects generated, but the JVM will be an optimization, that is, only create an object, at this time it executes faster than the stringbuffer stitching. Look at this: String s2 = "Hello"; String s3 = "World"; String S4 = "I love You"; String S1 = s2 + s3 + S4; In this case, three more objects are created, resulting in a waste of memory space.

Some questions and answers to questions that Java may ask

Question one: What do you want the work environment to be like?Standard answer: I am not demanding on the environment, I will try to adapt to the environment.Note: This is a question of whether you are testing your job search mentality, whether you are centered on yourself or on the job.Question two: What shortcomings do you think you have?Standard answer: Say some of the small shortcomings of this position, or say that their "shortcomings" is no work experience.Note: This problem is very sinist

15 Advanced Java multi-threaded face questions and answers _java

threadlocal, Blocking Queue, counting semaphore and concurrenthashmap are more prevalent. 15 Java Multi-threaded face questions and answers 1 Now there are T1, T2, T3 three threads, how do you ensure that T2 after T1 execution, T3 after the implementation of T2 execution? This threading problem is usually asked in the first round or during the phone

15 Top Java multithreaded questions and answers

the interview-based, not the actual application-based Java threading problem.A few additional questions to add:1) What is the difference between a green thread and a local thread in Java?2) What is the difference between threads and processes?3) What is context switching in multi-threading?4) What is the difference be

15 Java Multithreading questions and answers

thread encounters IO blocking, I do not think there is a way to abort the thread. If the thread is blocking because of a call to wait, sleep, or join methods, you can break the threads and wake it up by throwing interruptedexception. I've written earlier how to deal with blocking methods in Java has a lot of information about handling thread blocking.13) What is the difference between Cyclibarriar and Countdownlatch in

Java Developer interview questions, 3 years of working experience in Java Programmer interview

differences, HashMap and hashtable differences (learn the coding patterns in the underlying JDK for these classes).18, GC is what, why should have GC, simple introduction GC.19, float f=3.4 is correct.20. Introduce the collection framework in Java.21. Implementation of the comparison method in collection framework22. The difference between string and StringBuffer23, final, finally, finalize the difference2

15 Top Java multithreaded questions and answers

blocked thread in Java?This is a tricky problem with threading and blocking, and it has a lot of solutions. If the thread is blocked by IO, I think there is no way to stop the thread. If the thread waits for blocking by calling (), sleep (), or join (), you can break the thread and throw it to wake up the interruptedexception. How to handle blocking methods in Java, as I wrote earlier, there is a lot of in

Total Pages: 15 1 .... 7 8 9 10 11 .... 15 Go to: Go

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.