自己设计一个图片加载框架

  • 35

  • 36

  • 37

  • 38

  • 39

  • 40

  • 41

  • 42

好了,现在当我们准备加载一张网络图片到imageview。我们构建这样一个图片加载构建类

public static LoaderBuilder bind(ImageView imageView) { if (imageView == null) throw new NullPointerException("imageView can not be null"); if (mInstance == null) { mInstance = new Builder(imageView.getContext()).build(); } return new LoaderBuilder(imageView, mInstance); }

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

返回一个构建对象,然后调用他的 LoadUrl()方法,在这个方法里我们先检查加载配置,如果没有设置加载配置就用全局默认的那个。然后将加载请求放入请求队列

@NonNull public void putTask(final Context context, final LoaderConfigure configure, final ImageView imageView, final String uri) { //加时间戳,防止列表加载的时候有相同路径的多张图片重复加载错乱问题 final String key = Utils.md5(uri); final String tag = key+ System.currentTimeMillis(); Bitmap bm = null; bm = memoryCacheCheck(key); if (bm != null) { imageView.setTag(tag); ImageInfo imageInfo = new ImageInfo(imageView, tag, bm, configure); Message msg = new Message(); msg.what = 0; msg.obj = imageInfo; UIHandler.sendMessageAtFrontOfQueue(msg);//内存找到优先直接加载。速度快 } else { if (imageView.getTag() != null) { removeTask(imageView);//顺序不能错,先从任务队列移除这个imageView之前所绑定的任务 } imageView.setTag(tag); Runnable runnable; if (uri.startsWith("http")) { runnable = getNetImageRunnable(context, configure, imageView, uri, tag,key); } else { runnable = getLocalImageRunnable(context, configure, imageView, uri, tag,key); } TaskInfo info = new TaskInfo(imageView, runnable); synchronized (mTaskQueue) { if (mTaskQueue.contains(info)) { mTaskQueue.remove(info); mTaskQueue.add(info); } else { mTaskQueue.add(info); } } } }

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 10

  • 11

  • 12

  • 13

  • 14

  • 15

  • 16

  • 17

  • 18

  • 19

  • 20

  • 21

  • 22

  • 23

  • 24

  • 25

  • 26

  • 27

  • 28

  • 29

  • 30

  • 31

  • 32

  • 33

  • 34

  • 35

  • 36

加载网络图片的任务生成

@NonNull public Runnable getNetImageRunnable(final Context context, final LoaderConfigure configure, final ImageView imageView, final String url, final String tag, final String key) { return new Runnable() { @Override public void run() { // TODO: 这里其实应该加入优先级。本地如果有这个文件,应该优先级高一点,或者额外给个本地解析任务队列 Bitmap bm = getBitmapFromDiskCache(context, key, imageView); if (bm == null) { ResponseInfo responseInfo = mInstance.mDownloader.downloadImgByUrl(url); if (responseInfo.success)// 如果下载成功 { bm = dealImage(configure, imageView, key, responseInfo.bitmap); } } ImageInfo imageInfo = new ImageInfo(imageView, tag, bm, configure); Message msg = new Message(); msg.what = 0; msg.obj = imageInfo; UIHandler.sendMessage(msg); } }; }

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 10

  • 11

  • 12

  • 13

  • 14

  • 15

  • 16

  • 17

  • 18

  • 19

  • 20

  • 21

  • 22

  • 23

  • 24

  • 25

逻辑就是先从内存找,找到就直接放到显示图片的队列的最前方,优先显示,这里用sendMessageAtFrontOfQueue这一句代码的原因是后进来的图片加载请求肯定是用户当前浏览位置或者是离用户当前浏览位置最近的,应该最先显示给用户看。

内存里没找到就加入到请求队列里,同时移除当前imageview之前的加载请求,同一个imageview不同请求一般是出现在列表页使用了viewholder机制的情况下,因为用户不一定再会回到之前的位置。

下载成功后对图片根据配置进行处理

private Bitmap dealImage(LoaderConfigure configure, ImageView imageView, String key, Bitmap bm) { if (configure.cacheBaseImage || !configure.adjust) {//缓存原图,或者不压缩的情况下 putIntoCache(configure, key, bm); } if (configure.adjust) {//是否根据控件大小压缩图片大小 bm = ImageUtil.scaleImg(bm, imageView.getWidth(), imageView.getHeight()); if (!configure.cacheBaseImage) {//缓存压缩后图片 putIntoCache(configure, key, bm); } } return bm; }

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 10

  • 11

  • 12

下面加载本地图片的任务生成

@NonNull public Runnable getLocalImageRunnable(final Context context, final LoaderConfigure configure, final ImageView imageView, final String path, final String tag, final String key) { return new Runnable() { @Override public void run() { Bitmap bm = getBitmapFromDiskCache(context, key, imageView); if (bm == null) { bm = getBitmapFromDisk(context, path, imageView); if (bm!= null) { bm = dealImage(configure, imageView, key, bm); } } ImageInfo imageInfo = new ImageInfo(imageView, tag, bm, configure); Message msg = new Message(); msg.what = 0; msg.obj = imageInfo; UIHandler.sendMessage(msg); } }; }

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 10

  • 11

  • 12

  • 13

  • 14

  • 15

  • 16

  • 17

  • 18

  • 19

  • 20

  • 21

  • 22

  • 23

将图片加载请求放入请求队列后做一些加载前需要做的事,这里我选择设置占位图片

public static void pretreatmentImage(Context context, ImageView imageView, LoaderConfigure configure) { Bitmap bm = null; if (configure.loading > 0) bm = ReadBitmapById(context, configure.loading); if (bm != null) { imageView.setImageBitmap(configureImage(bm, imageView, configure)); } }

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 10

通知图片加载器有加载任务进来了,

protected void runTask() { mPoolThreadHandler.sendEmptyMessage(0); }

  • 1

  • 2

  • 3

  • 4

构建单例的时候启动后台轮询线程

private void initBackThread() { mPoolThread = new Thread() { @Override public void run() { Looper.prepare(); mPoolThreadHandler = new Handler() { @Override public void handleMessage(Message msg) { // 线程池去取出一个任务进行执行 Runnable runnable = getTask(); if (runnable != null) { mThreadPool.execute(runnable); } } }; Looper.loop(); } }; mPoolThread.start(); }

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 10

  • 11

  • 12

  • 13

  • 14

  • 15

  • 16

  • 17

  • 18

  • 19

  • 20

  • 21

  • 22

这里设置取任务的顺序方式

private Runnable getTask() { synchronized (mTaskQueue) { if (mTaskQueue.isEmpty()) return null; if (mType == Type.FIFO) { return mTaskQueue.removeFirst().getRunnable(); } else if (mType == Type.LIFO) { return mTaskQueue.removeLast().getRunnable(); } } return null; }

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 10

  • 11

  • 12

  • 13

前面当我们图片下载成功后将图片信息进行封装后传递给了UIHandler

if (responseInfo.success)// 如果下载成功 { bm = dealResponse(configure, imageView, tag, responseInfo.bitmap); } } ImageInfo imageInfo = new ImageInfo(imageView, tag, bm, configure); Message msg = new Message(); msg.what = 0; msg.obj = imageInfo; UIHandler.sendMessage(msg);

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 10

我们在UIHandler把图片显示在imageview上 ,根据加载配置对图片做显示前的处理,判断图片所对应的tag和imageview是否一致。避免列表加载网络图片显示错乱,如果图片获取失败就显示失败的占位图片

private Handler UIHandler = new Handler() { @Override public void handleMessage(Message msg) { switch (msg.what) { case 0: ImageInfo imageInfo = (ImageInfo) msg.obj; Bitmap bm = imageInfo.getBitmap(); LoaderConfigure configure = imageInfo.getLoaderConfigure(); ImageView imageView = imageInfo.getImageView(); if (imageView.getTag() != null && imageView.getTag().equals(imageInfo.getTag())) { if (bm == null) { if (configure.error > 0) { bm = ImageUtil.ReadBitmapById(mAppliactionContext, configure.error); } } if (bm != null) { bm = ImageUtil.configureImage(bm, imageView, configure); imageView.setImageBitmap(bm); } } break; } } };

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 10

  • 11

  • 12

  • 13

  • 14

  • 15

  • 16

  • 17

  • 18

  • 19

  • 20

  • 21

  • 22

  • 23

  • 24

  • 25

完整的HelloLoader 类

package com.sunshine.view.library; import android.annotation.SuppressLint; import android.app.Activity; import android.content.Context; import android.graphics.Bitmap; import android.os.Handler; import android.os.Looper; import android.os.Message; import android.support.annotation.NonNull; import android.widget.ImageView; import com.sunshine.view.library.cache.Cache; import com.sunshine.view.library.cache.LruCache; import com.sunshine.view.library.data.ImageInfo; import com.sunshine.view.library.data.ResponseInfo; import com.sunshine.view.library.data.TaskInfo; import com.sunshine.view.library.download.Downloader; import com.sunshine.view.library.download.HttpUrlConnectionDownLoader; import com.sunshine.view.library.utils.ImageSizeUtil; import com.sunshine.view.library.utils.ImageUtil; import com.sunshine.view.library.utils.Utils; import java.io.File; import java.util.LinkedList; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; /** * Created by Administrator on 2016/11/1. */ public class HelloLoader { static volatile HelloLoader mInstance; Context mAppliactionContext; Cache cache; String mDiskCachePath; LoaderConfigure mDefaultConfigure;//默认的全局图片加载配置 Downloader mDownloader;//图片加载器 LinkedList<TaskInfo> mTaskQueue;//解析请求队列 ExecutorService mThreadPool;// 线程池 int threadCount = 4; Handler mPoolThreadHandler;//线程池循环句柄 Thread mPoolThread;//后台任务调度线程 Type mType = Type.LIFO;//请求加载顺序:正序还是倒序 public enum Type { FIFO, LIFO; } //主线程设置图片句柄 @SuppressLint("HandlerLeak") private Handler UIHandler = new Handler() { @Override public void handleMessage(Message msg) { switch (msg.what) { case 0: ImageInfo imageInfo = (ImageInfo) msg.obj; Bitmap bm = imageInfo.getBitmap(); LoaderConfigure configure = imageInfo.getLoaderConfigure(); ImageView imageView = imageInfo.getImageView(); if (imageView.getTag() != null && imageView.getTag().equals(imageInfo.getTag())) { if (bm == null) { if (configure.error > 0) { bm = ImageUtil.ReadBitmapById(mAppliactionContext, configure.error); } } if (bm != null) { bm = ImageUtil.configureImage(bm, imageView, configure); imageView.setImageBitmap(bm); } } break; } } }; public HelloLoader(Context mAppliactionContext, Cache cache, String mDiskCachePath, LoaderConfigure mDefaultConfigure , Downloader downloader) { this.mAppliactionContext = mAppliactionContext; this.cache = cache; this.mDiskCachePath = mDiskCachePath; this.mDefaultConfigure = mDefaultConfigure; this.mDownloader = downloader; mTaskQueue = new LinkedList<>(); threadCount = Runtime.getRuntime().availableProcessors(); mThreadPool = Executors.newFixedThreadPool(threadCount + 1); initBackThread(); } public static LoaderBuilder bind(ImageView imageView) { if (imageView == null) throw new NullPointerException("imageView can not be null"); if (mInstance == null) { mInstance = new Builder(imageView.getContext()).build(); } return new LoaderBuilder(imageView, mInstance); } private Bitmap memoryCacheCheck(String key) { Bitmap cached = cache.get(key); return cached; } private Bitmap put2MemoryCache(String key, Bitmap bitmap) { if (key == null) { throw new NullPointerException("cache key can not be null"); } if (bitmap == null) { throw new NullPointerException("the bitmap put to cache is null"); } Bitmap cached = cache.put(key, bitmap); return cached; } /** * 初始化后台轮询线程 */ private void initBackThread() { mPoolThread = new Thread() { @Override public void run() { Looper.prepare(); mPoolThreadHandler = new Handler() { @Override public void handleMessage(Message msg) { // 线程池去取出一个任务进行执行 Runnable runnable = getTask(); if (runnable != null) { mThreadPool.execute(runnable); } } }; Looper.loop(); } }; mPoolThread.start(); } protected void runTask() { mPoolThreadHandler.sendEmptyMessage(0); } private Runnable getTask() { synchronized (mTaskQueue) { if (mTaskQueue.isEmpty()) return null; if (mType == Type.FIFO) { return mTaskQueue.removeFirst().getRunnable(); } else if (mType == Type.LIFO) { return mTaskQueue.removeLast().getRunnable(); } } return null; } protected void removeTask(ImageView imageView) { synchronized (mTaskQueue) { mTaskQueue.remove(new TaskInfo(imageView, null)); } } /** * 从内存取,,取到直接加载。因为不占据请求和解析资源,而且刚刚加载过的图片滑动过来再次加载也不合理 * 没取到则放入解析和请求队列 * * @date 2016/11/3 9:45 */ @NonNull public void putTask(final Context context, final LoaderConfigure configure, final ImageView imageView, final String uri) { //加时间戳,防止列表加载的时候有相同路径的多张图片重复加载错乱问题 final String key = Utils.md5(uri); final String tag = key+ System.currentTimeMillis(); Bitmap bm = null; bm = memoryCacheCheck(key); if (bm != null) { imageView.setTag(tag); ImageInfo imageInfo = new ImageInfo(imageView, tag, bm, configure); Message msg = new Message(); msg.what = 0; msg.obj = imageInfo; UIHandler.sendMessageAtFrontOfQueue(msg);//内存找到优先直接加载。速度快 } else { if (imageView.getTag() != null) { removeTask(imageView);//顺序不能错,先从任务队列移除这个imageView之前所绑定的任务 } imageView.setTag(tag); Runnable runnable; if (uri.startsWith("http")) { runnable = getNetImageRunnable(context, configure, imageView, uri, tag,key); } else { runnable = getLocalImageRunnable(context, configure, imageView, uri, tag,key); } TaskInfo info = new TaskInfo(imageView, runnable); synchronized (mTaskQueue) { if (mTaskQueue.contains(info)) { mTaskQueue.remove(info); mTaskQueue.add(info); } else { mTaskQueue.add(info); } } } } @NonNull public Runnable getNetImageRunnable(final Context context, final LoaderConfigure configure, final ImageView imageView, final String url, final String tag, final String key) { return new Runnable() { @Override public void run() { // TODO: 这里其实应该加入优先级。本地如果有这个文件,应该优先级高一点,或者额外给个本地解析任务队列 Bitmap bm = getBitmapFromDiskCache(context, key, imageView); if (bm == null) { ResponseInfo responseInfo = mInstance.mDownloader.downloadImgByUrl(url); if (responseInfo.success)// 如果下载成功 { bm = dealImage(configure, imageView, key, responseInfo.bitmap); } } ImageInfo imageInfo = new ImageInfo(imageView, tag, bm, configure); Message msg = new Message(); msg.what = 0; msg.obj = imageInfo; UIHandler.sendMessage(msg); } }; } @NonNull public Runnable getLocalImageRunnable(final Context context, final LoaderConfigure configure, final ImageView imageView, final String path, final String tag, final String key) { return new Runnable() { @Override public void run() { Bitmap bm = getBitmapFromDiskCache(context, key, imageView); if (bm == null) { bm = getBitmapFromDisk(context, path, imageView); if (bm!= null) { bm = dealImage(configure, imageView, key, bm); } } ImageInfo imageInfo = new ImageInfo(imageView, tag, bm, configure); Message msg = new Message(); msg.what = 0; msg.obj = imageInfo; UIHandler.sendMessage(msg); } }; } private Bitmap getBitmapFromDiskCache(Context mContext, String key, ImageView imageView) { Bitmap bm = null; File file = Utils.getDiskCacheDir(mInstance.mDiskCachePath, key); if (file.exists())// 如果在本地缓存文件中发现 { ImageSizeUtil.ImageSize imageSize = ImageSizeUtil.getImageViewSize(imageView); // 根据控件大小获取本地压缩处理后的图片 bm = ImageUtil.decodeSampledBitmapFromPath(file.getAbsolutePath(), imageSize); } return bm; } private Bitmap getBitmapFromDisk(Context mContext, String path, ImageView imageView) { Bitmap bm = null; if (!Utils.checkNULL(path))// 如果文件路径不为空 { ImageSizeUtil.ImageSize imageSize = ImageSizeUtil.getImageViewSize(imageView); // 根据控件大小获取本地压缩处理后的图片 bm = ImageUtil.decodeSampledBitmapFromPath(path, imageSize); } return bm; } private Bitmap dealImage(LoaderConfigure configure, ImageView imageView, String key, Bitmap bm) { if (configure.cacheBaseImage || !configure.adjust) {//缓存原图,或者不压缩的情况下 putIntoCache(configure, key, bm); } if (configure.adjust) {//是否根据控件大小压缩图片大小 bm = ImageUtil.scaleImg(bm, imageView.getWidth(), imageView.getHeight()); if (!configure.cacheBaseImage) {//缓存压缩后图片 putIntoCache(configure, key, bm); } } return bm; } private void putIntoCache(LoaderConfigure configure, String key, Bitmap bm) { if (configure.memoryCache) { put2MemoryCache(key, bm);//放入内存缓存 } if (configure.diskCache) { Utils.write2File(mInstance.mDiskCachePath, bm, key);//写入本地文件 } } public static class Builder { Context mContext; LoaderConfigure mDefaultConfigure; Cache mCache; String mDiskCachePath; Downloader mDownloader; public Builder(Context context) { try {//防止传入的是activity的上下文 Activity activity = (Activity) context; mContext = context.getApplicationContext(); } catch (Exception e) { e.printStackTrace(); mContext = context; } } public Builder defaultLoaderConfigure(LoaderConfigure loaderConfigure) { mDefaultConfigure = loaderConfigure; return this; } public Builder downloader(Downloader downloader) { mDownloader = downloader; return this; } public Builder cache(Cache cache) { mCache = cache; return this; } public Builder diskCachePath(String loaderConfigure) { mDiskCachePath = loaderConfigure; return this; } public HelloLoader build() { if (mDefaultConfigure == null) { mDefaultConfigure = new LoaderConfigure(); } if (mCache == null) { mCache = createDefaultCache(); } if (Utils.checkNULL(mDiskCachePath)) { mDiskCachePath = mContext.getCacheDir().getPath(); } if (mDownloader == null) { mDownloader = createDefaultDownloader(); } mInstance = new HelloLoader(mContext, mCache, mDiskCachePath, mDefaultConfigure, mDownloader); return mInstance; } private Downloader createDefaultDownloader() { return new HttpUrlConnectionDownLoader(); } private Cache createDefaultCache() { int memoryCacheSize = Utils.getMemoryCacheSize(mContext); return new LruCache(memoryCacheSize); } } }

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 10

  • 11

  • 12

  • 13

  • 14

  • 15

  • 16

  • 17

  • 18

  • 19

  • 20

  • 21

  • 22

  • 23

  • 24

  • 25

  • 26

  • 27

  • 28

  • 29

  • 30

  • 31

  • 32

  • 33

  • 34

  • 35

  • 36

  • 37

  • 38

  • 39

  • 40

  • 41

  • 42

  • 43

  • 44

  • 45

  • 46

  • 47

  • 48

  • 49

  • 50

  • 51

  • 52

  • 53

  • 54

  • 55

  • 56

  • 57

  • 58

  • 59

  • 60

  • 61

  • 62

  • 63

  • 64

  • 65

  • 66

  • 67

  • 68

  • 69

  • 70

  • 71

  • 72

  • 73

  • 74

  • 75

  • 76

  • 77

  • 78

  • 79

  • 80

  • 81

  • 82

  • 83

  • 84

  • 85

  • 86

  • 87

  • 88

  • 89

  • 90

  • 91

  • 92

  • 93

  • 94

  • 95

  • 96

  • 97

  • 98

  • 99

  • 100

  • 101

  • 102

  • 103

  • 104

  • 105

  • 106

  • 107

  • 108

  • 109

  • 110

  • 111

  • 112

  • 113

  • 114

  • 115

  • 116

  • 117

  • 118

  • 119

  • 120

  • 121

  • 122

  • 123

  • 124

  • 125

  • 126

  • 127

  • 128

  • 129

  • 130

  • 131

  • 132

  • 133

  • 134

  • 135

  • 136

  • 137

  • 138

  • 139

  • 140

  • 141

  • 142

  • 143

  • 144

  • 145

  • 146

  • 147

  • 148

  • 149

  • 150

  • 151

  • 152

  • 153

  • 154

  • 155

  • 156

  • 157

  • 158

  • 159

  • 160

  • 161

  • 162

  • 163

  • 164

  • 165

  • 166

  • 167

  • 168

  • 169

  • 170

  • 171

  • 172

  • 173

  • 174

  • 175

  • 176

  • 177

  • 178

  • 179

  • 180

  • 181

  • 182

  • 183

  • 184

  • 185

  • 186

  • 187

  • 188

  • 189

  • 190

  • 191

  • 192

  • 193

  • 194

  • 195

  • 196

  • 197

  • 198

  • 199

  • 200

  • 201

  • 202

  • 203

  • 204

  • 205

  • 206

  • 207

  • 208

  • 209

  • 210

  • 211

  • 212

  • 213

  • 214

  • 215

  • 216

  • 217

  • 218

  • 219

  • 220

  • 221

  • 222

  • 223

  • 224

  • 225

  • 226

  • 227

  • 228

  • 229

  • 230

  • 231

  • 232

  • 233

  • 234

  • 235

  • 236

  • 237

  • 238

  • 239

  • 240

  • 241

  • 242

  • 243

  • 244

  • 245

  • 246

  • 247

  • 248

  • 249

  • 250

  • 251

  • 252

  • 253

  • 254

  • 255

  • 256

  • 257

  • 258

  • 259

  • 260

  • 261

  • 262

  • 263

  • 264

  • 265

  • 266

  • 267

  • 268

  • 269

  • 270

  • 271

  • 272

  • 273

  • 274

  • 275

  • 276

  • 277

  • 278

  • 279

  • 280

  • 281

  • 282

  • 283

  • 284

  • 285

  • 286

  • 287

  • 288

  • 289

  • 290

  • 291

  • 292

  • 293

  • 294

  • 295

  • 296

  • 297

  • 298

  • 299

  • 300

  • 301

  • 302

  • 303

  • 304

  • 305

  • 306

  • 307

  • 308

  • 309

  • 310

  • 311

  • 312

  • 313

  • 314

  • 315

  • 316

  • 317

  • 318

  • 319

  • 320

  • 321

  • 322

  • 323

  • 324

  • 325

  • 326

  • 327

  • 328

  • 329

  • 330

  • 331

  • 332

  • 333

  • 334

  • 335

  • 336

  • 337

  • 338

  • 339

  • 340

  • 341

  • 342

  • 343

  • 344

  • 345

  • 346

  • 347

  • 348

  • 349

  • 350

  • 351

  • 352

  • 353

  • 354

  • 355

  • 356

  • 357

  • 358

  • 359

  • 360

  • 361

  • 362

  • 363

  • 364

  • 365

  • 366

  • 367

  • 368

  • 369

  • 370

使用

写在最后

对程序员来说,很多技术的学习都是“防御性”的。也就是说,我们是在为未来学习。我们学习新技术的目的,或是为了在新项目中应用,或仅仅是为了将来的面试。但不管怎样,一定不能“止步不前”,不能荒废掉。

![
[]


文章以下内容会给出阿里与美团的面试题(答案+解析)、面试题库、Java核心知识点梳理等

《Android学习笔记总结+移动架构视频+大厂面试真题+项目实战源码》点击传送门,即可获取!

  • 297

  • 298

  • 299

  • 300

  • 301

  • 302

  • 303

  • 304

  • 305

  • 306

  • 307

  • 308

  • 309

  • 310

  • 311

  • 312

  • 313

  • 314

  • 315

  • 316

  • 317

  • 318

  • 319

  • 320

  • 321

  • 322

  • 323

  • 324

  • 325

  • 326

  • 327

  • 328

  • 329

  • 330

  • 331

  • 332

  • 333

  • 334

  • 335

  • 336

  • 337

  • 338

  • 339

  • 340

  • 341

  • 342

  • 343

  • 344

  • 345

  • 346

  • 347

  • 348

  • 349

  • 350

  • 351

  • 352

  • 353

  • 354

  • 355

  • 356

  • 357

  • 358

  • 359

  • 360

  • 361

  • 362

  • 363

  • 364

  • 365

  • 366

  • 367

  • 368

  • 369

  • 370

使用

写在最后

对程序员来说,很多技术的学习都是“防御性”的。也就是说,我们是在为未来学习。我们学习新技术的目的,或是为了在新项目中应用,或仅仅是为了将来的面试。但不管怎样,一定不能“止步不前”,不能荒废掉。

[外链图片转存中…(img-tqJ3U2jA-1715364551632)]

[外链图片转存中…(img-P3i83stQ-1715364551632)]
[]

[外链图片转存中…(img-hyoGYzRA-1715364551633)]
[外链图片转存中…(img-ZngRU0tm-1715364551633)]

文章以下内容会给出阿里与美团的面试题(答案+解析)、面试题库、Java核心知识点梳理等

《Android学习笔记总结+移动架构视频+大厂面试真题+项目实战源码》点击传送门,即可获取!

  • 3
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值