common java interview questions

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

You may not know the Java Foundation 40 common face questions and detailed answers!

to Wangwei"$ Java-jar Blockchain-java-jar-with-dependencies.jar-add "Send 3.5 BTC to Wangwei"Print Blockchain$ Java-jar Blockchain-java-jar-with-dependencies.jar-printSummarizeIn this article we implement the Blockchain storage function, next we will implement the address, transaction, wallet, some of the functions of

Common face questions for Java programmers

.char variable?Save Unicode to save Chinese characters20. Start a thread with run () or start ()?Start ();Run () put the executed code insideThird, intermediate simple answerWhat is the difference between 21.sleep () and wait ()?Sleep to the time to wake upWaiting to wake up22.JDBC How do transactions work?Set JDBC Auto-commit false to open transactions after multiple transactions commit exception rollback rollbackHow do I access the database in 23.Java

Java Common pen Questions < three >

APIC, Appletviewer.exe can run the. jar file with the JAR optionD. The Java class file that can be successfully run by Appleviewer must have the main () methodReference Answer: BCDAnalysis: J2SDK is a programming tool, Appletviewer.exe is used to explain the execution of Java applet applications, Appletviewer successfully run a Java class file without the main (

Java Collections common face questions Collection

1, introduce the structure of collection frameThe collection is a very important knowledge point in Java, which is divided into three data structures: list, Set, Map and queue. Their structural relationships in Java are as follows:The collection interface is the parent interface of list, Set, and queue.The set interface has two common implementation classes: Hash

Common face questions in Java framework

: hibernate always uses the locking mechanism of the database, never locking objects in memory! Just specify the isolation level for the JDBC connection, and then let the database take care of everything.class Lockmode defines the different locking levels required for hibernateLockmode.upgrade,lockmode.upgrade_nowait,lockmode.read;hibernate refused connection, server crashes cause1. DB does not open 2. There may be a problem with the network connection 3. The connection configuration is 4 wrong.

Java exception schema diagram and common face questions

The red check for exceptions is whether eclipse will prompt you for a try catch or throws.Non-check exception is/0,nullpointexception, data out-of-bounds access Indexofoutbounds exceptionError: The most common oom error, as well as Classnotfoundeerror,stackoverflowerror :The question generalization of Java exception processing surface1. What is the difference between error and exception?Error indicates syst

Java Common pen Questions < four >

1, the following JSON format data, the error is:A, {company:4399}B, {"Company": {"name": [4399,4399,4399]}}C, {[4399,4399,4399]}D, {"Company": {[4399,4399,4399]}E, {"Company": {"name": 4399}}Reference Answer: ACAnalysis: The A:json object requires that the property must have double quotation marks; C:json must have a set of ordered key-value pairs. In addition, JSON can represent simple values (strings, numeric values, etc.), objects (a set of ordered key-value pairs, values for each set of key-

Java Common Algorithm questions (14)

PackageCom.xiaowu.demo;/*** Enter a certain month of the year, judging the day is the first of the year? * * * @authorWQ **/ Public classDemo14 { Public Static voidMain (string[] args) {year (2017, 6, 5); } /*** * Common year February 28 days, leap year February 29 days. * Year number (last two bits not 00) can be divisible by 4 is a leap year (such as 1988, 1996), the number of years (the last two digits is 00) can be divisibl

Java basic questions: What are the similarities and differences between runtime exceptions and general exceptions? What is the difference between error and exception? Please write the five most common runtimeexception ?,

Java basic questions: What are the similarities and differences between runtime exceptions and general exceptions? What is the difference between error and exception? Please write the five most common runtimeexception ?, ThrowableIt is the parent class for Java Error handling. It has two subclasses: Error and Exception

The difference between the forward and redirect of Common face questions in Java

kind of request forwarding, when a single hyperlink, the browser's address bar will appear the current request address, if the server-side response is completed, found that the address bar address changed, it is proved that the indirect request forwarding. Conversely, if the address does not change, it represents a direct request forward or no forwarding.Q: What are the principles and differences between direct forwarding and indirect forwarding?A: Forward and redirect represent two kinds of re

Object-oriented common face questions in Java

);2, Student s first in the stack memory to open up the stack memory space, create a student object, the heap memory needs to request heap memory space;3, through the non-parametric construction method to the Student class object default initialization;4, by assigning values to the member variables, the object is displayed to initialize;5, the display initialization is complete, after the whole object is created, the object is allocated the memory space address value;6, find the corresponding ob

List a few common questions about Java collections and give answers

. TreeSetthe largest and smallest elements can be obtained from. Summary: Collections.sort() provides a list that is sorted once. PriorityQueueand TreeSet Dynamic maintenance of the ordered collection.9. Copy ListThere are two ways to copy a list. One is to use a ArrayList constructor. 1 ArrayListnewArrayList The other is to use Collections.copy() . 12 ArrayListnewArrayListCollections.copy(dstList, srcList); It is important to

The most common 10-track questions in Java

difference between error and exception?Error indicates a serious problem in situations where recovery is not impossible but difficult. For example, memory overflow. It is impossible to expect the program to handle such situations.Exception represents a design or implementation issue. That is, it means that if the program runs normally, it never happens.Ninth, give me one of your most common runtime exception.Cmmexception, Concurrentmodificationexcept

The most common 10-track questions in Java

difference between error and exception?Error indicates a serious problem in situations where recovery is not impossible but difficult. For example, memory overflow. It is impossible to expect the program to handle such situations.Exception represents a design or implementation issue. That is, it means that if the program runs normally, it never happens.Ninth, give me one of your most common runtime exception.Cmmexception, Concurrentmodificationexcept

Java Common algorithm questions (vi)

PackageCom.xiaowu.demo;/*** Enter two positive integers m and N to find their greatest common divisor and least common multiple. * * @authorWQ **/ Public classDemo6 { Public Static voidMain (string[] args) {intA = 5; intb = 10; intMax =F (A, b); intMin = A * b/Max; System.out.println ("Greatest common divisor:" + max + "least

Java Common Algorithm questions (27)

++; }Else if(IsEven (Arr[i]) IsEven (Arr[j])) {J--; }Else{i++; } } } Public Static voidMain (string[] args) {Arraydemo Arraydemo=NewArraydemo (); int[] arr = {4,3,5,2,10,6,7,22,23,34,45,56}; Arraydemo.order (arr); for(intI:arr) {System.out.println (i); } System.out.println (IsEven (1)); System.out.println (IsEven (12)); System.out.println (IsEven (13)); System.out.println (IsEven (14)); System.out.println (IsEven (15)); System.out.println ("----------

Java Common Algorithm questions (v)

PackageCom.xiaowu.demo;/*** Use the nesting of conditional operators to complete this problem: the students of the academic score >=90 with a, 60-89 points between the use of B, 60 points below the C expression. * * * @authorWQ **/ Public classDemo5 { Public Static voidMain (string[] args) {score (90); } Public Static voidScore (intN) {Chars = N >= 90? ' A ': (N ); System.out.println ("This grade is:" +s); }}Java

Java Common Algorithm questions (23)

PackageCom.xiaowu.demo;/*** Give a positive integer not more than 5 bits, ask: ① It is a number of digits; ② print out your numbers in reverse order. * * * @authorWQ **/ Public classDemo23 { Public Static voidMain (string[] args) {f (123789); } Public Static voidFLongl) {String s=long.tostring (L); Char[] C =S.tochararray (); intj =c.length; System.out.println (L+ "is a" + j + "bit number. "); System.out.print (L+ "Output in reverse order is:"); for(inti = j-1; I >= 0; i--) {System.out.pr

Java Common Algorithm questions (17)

PackageCom.xiaowu.demo;//output 99 multiplication table. Public classDemo17 { Public Static voidMain (string[] args) {table (9); } /*** I use the vernacular interpretation of "\ T" means: In the same buffer in the horizontal jump 8 spaces, JDK1.5 is this, as for the change in the higher version, then I am not very clear!! * (sometimes there are books called "\ T" is a tab, the alignment is used) * *@paramN*/ Public Static voidTableintN) { for(inti = 1; I ) { for(intj = 1; J )

Java Common algorithm questions (13)

PackageCom.xiaowu.demo;/*** Bonuses awarded by the enterprise are subject to profit (I) less than or equal to $100,000, bonuses may be raised by 10%, profit above $100,000, less than $200,000, under 100,000 commission, * higher than 10% yuan, 100,000, 7.5% to 200,000 Higher than 200,000 yuan, can be 5%, 400,000 to 600,000, higher than 400,000 yuan of the portion, can be a commission of 3%, * 600,000 to 1 million, higher than 600,000 yuan of the portion, can be a commission of 1.5%, higher than 1

Total Pages: 15 1 .... 11 12 13 14 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.