You can understand the difference between Callable and Runnable after reading it

Callable Interface public interface Callable<V> { V call() throws Exception; } Test class import java.util.concurrent.ExecutionException; import java.util.concurrent.FutureTask; import java.util.concurrent.Callable; /** * @author syw * @date 2021 22:00, August 25 */ public class CallableTest implements Callable<Str ...

Added by ashii on Sun, 19 Dec 2021 13:40:39 +0200

[hard big data] summary of Flink's enterprise application in real-time computing platform and real-time data warehouse

Welcome to the blog home page: https://blog.csdn.net/u013411339 Welcome to like, collect, leave messages, and exchange messages!This article was originally written by [Wang Zhiwu] and started on CSDN blog!This article is the first CSDN forum. It is strictly prohibited to reprint without the permission of the official and myself! This artic ...

Added by Adam_28 on Sun, 19 Dec 2021 13:25:10 +0200

In 2020, I will use MVVM in this project

Recently, I saw several articles related to Jetpack MVVM, which made me want to get into this mess. I came into contact with Jetpack's set of development tools in the second half of 2017, and have since taken it as the main framework for development. During this period of use, I stepped on some pits and accumulated some experience. In order to ...

Added by coalgames on Sat, 18 Dec 2021 22:02:42 +0200

Android interview (V) prepare for Android interview

HandlerActivity.runOnUiThread()View.post(Runnable r) Let's talk about the Handler mechanism Handler is mainly composed of the following parts. Handler Handler is a message auxiliary class, which is mainly responsible for sending various message events to the message pool Sendmessage() and the handler that handles the corresponding message e ...

Added by woodsy2k on Sat, 18 Dec 2021 10:49:29 +0200

The three most classic containers in C + + are Vector, Map and List

There are many kinds of containers in C + +. The common ones are sequential containers: vector, deque and list. There are also associated containers: set, multiset, map and multimap. There are too many containers. Let's talk about the three most commonly used containers: vector, list and map. First: Vector container Sketch Map: characteris ...

Added by j0hn_ on Sat, 18 Dec 2021 05:23:23 +0200

2021 latest Ali Java advanced interview questions and answers, three concurrent tool classes frequently asked in interviews

Semaphore is a count based semaphore. It can set a threshold. Based on this, multiple threads compete to obtain the license signal and return it after making their own application. When the threshold is exceeded, the thread application license signal will be blocked. Semaphore can be used to build some object pools and resource pools, such as ...

Added by kostik on Fri, 17 Dec 2021 09:29:56 +0200

Java parallel program foundation, java development interview questions

3. stop()Method directly terminates the thread, and**The lock held by this thread will be released immediately**. These locks are just used to maintain object consistency. If the write thread sucks in half of the data and forcibly terminates, the object will be written bad. At the same time, because the lock has been released, another read ...

Added by rgpayne on Fri, 17 Dec 2021 09:05:50 +0200

2020 Android interview key and difficult points (10000 words), dry goods and fine talk

JNI principle: [analysis of registration process of Dalvik virtual machine JNI method] Example: when libnanosleep When the so file is loaded, the function JNI_OnLoad will be called. In function JNI_ In onload, the parameter vm describes the Dalvik virtual machine in the current thread. A JNIEnv object can be obtained by calling its member fun ...

Added by turek on Fri, 17 Dec 2021 08:35:25 +0200

Java annotation and reflection, 2021 byte spring trick technical interview questions

Class load Load the bytecode content of the class file into memory, convert these static data into the run-time data structure of the method area, and then generate a Java Lang.class object The class loader loads classes into memory. There are bootstrap classloader (provided by the JVM, written in C + +, which is responsible for the core ...

Added by randalusa on Fri, 17 Dec 2021 03:30:42 +0200

How can the 38 year old middle-aged unemployed live? Java basic interview question - multithreading

[]( )Callable thread creation public class CallableTest { public static void main(String[] args) throws ExecutionException,InterruptedException { // new Thread(new Runnable()).start(); // new Thread(new FutureTask<V>()).start(); // new Thread(new FutureTask<V>( Callable )).start(); new Thread ...

Added by shwathi on Fri, 17 Dec 2021 02:53:10 +0200