AsiaInfo (Chengdu) Java Internship Interview Experience

AsiaInfo Java Internship

The interview was originally at 2:30 in the afternoon (4-3), I started the written test at 20:00 because I arrived early (they were still on lunch break), the time limit was 40 minutes

puzzle

  1. There are 10 boxes of canned food, and each of these 10 boxes of canned food is 50 boxes, and each box has 50g. But there is one box, and each box is only 45g. Now there is only one scale, and it is only allowed to be weighed once . Find out the box. (I didn’t make it at the time, I wrote the [binary search] blindly haha)

Each box is numbered 1, 2, 3. . . . .

Take one can from the first box, two cans from the second box, and three cans from the third box. . . . .

java problem

  1. Difference between abstract class and interface

A class with the abstract modifier is an abstract class, and an abstract class cannot create instance objects. A class with an abstract method must be defined as an abstract class, and the methods in an abstract class class do not have to be abstract. An abstract method defined in an abstract class must be implemented in a concrete subclass, so there cannot be abstract constructors or abstract static methods. If the subclass does not implement all the abstract methods in the abstract superclass, then the subclass must also be defined as abstract type.

An interface can be said to be a special case of an abstract class, and all methods in an interface must be abstract. The method definition in the interface defaults to the public abstract type, and the member variable type in the interface defaults to the public static final type.

An interface is a special abstract class that only contains definitions of constants and methods (abstract methods), without the implementation of variables and methods.

Abstract class: has abstract methods and non-abstract methods

Interface: All methods are abstract

An interface can implement multiple parent interfaces, and use the implemented interfaces to separate them.

Features of the interface

A: It is a rule that is exposed to the outside world

B: is an extension of the function

C: The appearance of the interface reduces the coupling.

Coupling (the relationship between classes and classes)

Cohesion (the ability of a class to perform a function)

Programming Specification: High Cohesion, Low Coupling

D: The interface can be implemented more than once. Such as: CPU and motherboard, notebook USB socket, socket

  1. Application and implementation of reflection

(No), we need to continue to improve.

/fhkkkbfgggjk/article/details/85307922

  1. try catch method to write errors to the log

//error 
try {
   //some code
}
catch(Exception e){
   e.printStackTrace();
}

try {
       //Business logic 
      Log( "Log: Executed successfully" );
     }
catch (System.Exception ex)
    {
        Log( "Log: Exception," +ex.Message);
    }
 finally {
           Log( "Log: No matter whether it succeeds or fails, there is this log record" );
        }

4.1000000 Demo classes want to call the methods in Demo, how to implement

  1. The principle of jvm executing calss file

  2. The difference between stack, heap and queue

  3. Cookies and sessions

database questions

  1. Regular Students, Courses, Transcripts

Examine the aggregate function count , and group by

  1. Precautions for index usage

front end

<div class="d1">

</div>
<div class="d2">

</div>

  1. There are three ways to get d1 elements with jq, and two ways to get d1 with js

  2. get and post

open question

  1. Describe a bug that affects you deeply and explain how to solve it

interviewer questions

  1. Ask Reflex

  2. Common collections of List and their corresponding underlying principles

  3. The bottom layer of concurrenthashmap

4.ioc aop

  1. How to design a million-level List

HR

  1. Talked about job requirements, salary 2500

  2. Is to use their internal framework

  3. Usually 1, 2, 4 work overtime

。。。。。

Interview feeling

  1. Your basic knowledge is not solid enough

  2. Immerse yourself in new technologies

  3. Get the offer

Leave a Comment

Your email address will not be published. Required fields are marked *