목록Java (7)
0gam
A Quick Refresher on SOLID SOLID is an acronym for a set of five software development principles, which if followed, are intended to help developers create flexible and clean code. The five principles are: The Single Responsibility Principle — Classes should have a single responsibility and thus only a single reason to change. The Open/Closed Principle — Classes and other entities should be open..
This example-driven tutorial gives an in-depth overview about Java 8 streams. When I first read about the Stream API, I was confused about the name since it sounds similar to InputStream and OutputStream from Java I/O. But Java 8 streams are a completely different thing. Streams are Monads, thus playing a big part in bringing functional programming to Java:In functional programming, a monad is a..
Features of JavaThere is given many features of java. They are also known as java buzzwords. The Java Features given below are simple and easy to understand. SimpleObject-OrientedPortablePlatform independentSecuredRobustArchitecture neutralDynamicInterpretedHigh PerformanceMultithreadedDistributed Platform Independent SecuredJava is secured because:No explicit pointerJava Programs run inside vir..
History of Java For the green team members, it was an advance concept at that time. But, it was suited for internet programming. Later, Java technology as incorporated by Netscape.Java history is interesting to know. The history of java starts from Green Team. Java team members (also known as Green Team), initiated a revolutionary task to develop a language for digital devices such as set-top bo..
Difference between Java Heap Space and Stack MemoryBased on the above explanations, we can easily conclude following differences between Heap and Stack memory.Heap memory is used by all the parts of the application whereas stack memory is used only by one thread of execution.Whenever an object is created, it’s always stored in the Heap space and stack memory contains the reference to it. Stack m..
Non-blocking I/O (Java)From Wikipedia, the free encyclopediaNon-blocking I/O (usually called NIO, and sometimes called "New I/O") is a collection of Java programming language APIs that offer features for intensive I/O operations. It was introduced with the J2SE 1.4 release of Java by Sun Microsystems to complement an existing standard I/O. NIO was developed under the Java Community Process as JS..
I think the docs explain the difference and usage of these two functions pretty well:newFixedThreadPoolCreates a thread pool that reuses a fixed number of threads operating off a shared unbounded queue. At any point, at most nThreads threads will be active processing tasks. If additional tasks are submitted when all threads are active, they will wait in the queue until a thread is available. If ..