Mr.Humorous 🥘

Nothing is impossible, the word itself says 'I'm possible'❗️ 💪

Generic Array Creation

How to get around of generic array creation?

1. Problem Java does not allow you to create arrays of generic classes: Set<String>[] sets = new Set<String>[5]; 2. Workaround 1: Raw types @SuppressWarnings("unchecked") Set<Strin...

Arrays vs. ArrayLists

Understanding when to choose Arrays vs. ArrayLists

1. Arrays vs ArrayLists (and other Lists) An array (something like int[]) is a built in type while ArrayList is a regular class part of the Java standard library. 2. When to use which? Sometimes y...

Basics of Software Architecture Design in Java

Understanding Software Architecture Design

1. SOLID Principles S <–> SINGLE RESPONSIBILITY PRINCIPLE A software entity (class, method) should have only one reason to change If a class or a method does more t...

What is Java String Pool?

Understanding String Pool

As the name suggests, String Pool in java is a pool of Strings stored in Java Heap Memory. We know that String is special class in java and we can create String object using new operator as well as...

String Interning - What, Why, and When?

Understanding String Interning

1. What is String Interning? String Interning is a method of storing only one copy of each distinct String Value, which must be immutable. In Java, String class has a public method intern() that r...

What is Node.js for Java Developers?

Understand Node.js from Java Perspective

1. Java 1.1 Java Runtime Environment Java needs a runtime environment called JRE for running a Java program. The JRE has a virtual machine called Java Virtual Machine (JVM). The JVM has many compon...

What are CPU and GPU?

Understand what is the difference b/w CPU and GPU and how to avoid bottlenecking

1. CPU v.s. GPU The GPU handles the visual elements. Such as shaders, effects, shadows, light, textures, etc. The graphics card determines how many polygons that can be displayed at a time. It also...

Restful API 实践讲解

总结Restful的设计细节和介绍如何设计出易于理解和使用的API

一、URL 设计 1.1 动词 + 宾语 RESTful 的核心思想就是,客户端发出的数据操作指令都是"动词 + 宾语"的结构。比如,GET /articles这个命令,GET是动词,/articles是宾语。 动词通常就是五种 HTTP 方法,对应 CRUD 操作。 GET:读取(Read) POST:新建(Create) PUT:更新(Update) PATCH:更新(...

What are CPU and GPU?

Understand what is the difference b/w CPU and GPU and how to avoid bottlenecking

1. What is a Function? A function is a process which takes some input, called arguments, and produces some output called a return value. Functions may serve the following purposes: Mapping: Prod...

What is Proxy Server?

Understanding how proxy servers work

1. Overview You may not know it, but every time you reach out to a website or connect with anyone online, your online connection gives your computer “address” to the site/person you’re connecting...