Java Notes - fcrimins/fcrimins.github.io GitHub Wiki
Virtual Memory Usage from Java under Linux, too much memory used (10/16/16)
Stream in Java 8 (7/25/16)
Inter-thread Communication in Java (7/7/16)
Java Concurrency Tutorials (4/15/16)
Java 8 Streams Cheatsheet (1/29/16)
Using Traits in Java 8 (1/28/16)
Lazy Evaluation in Java (1/19/16)
4 Reasons Why Java is Still #1 (1/19/16)
Programming Peculiarities: 6 Java Oddities (12/10/15)
Cool Java 8 Features: To Use or not to Use (11/16/15)
- Includes a nice simple example comparing implementations of 2 functions written in both functional and imperative style--as well as a combined implementation of the 2 styles.
Even If Oracle Is Losing Interest In Java, Should You Worry? (11/13/15)
Synchronized java.util.HashMap vs. java.util.concurrent.ConcurrentHashMap (11/9/15)
The Future of the Java Ecosystem (10/14/15)
Streams in Java 8 (also see: Functional Programming)
Java Resources
- https://github.com/cxxr/better-java
- And reproduced here
- Tutorial (not very good/advanced): http://introcs.cs.princeton.edu/java/home/
- Tutorial: http://pages.cs.wisc.edu/~hasti/cs368/JavaTutorial/
Coursera Java
- https://www.coursera.org/course/algs4partI and https://www.coursera.org/course/algs4partII
- Java book: http://introcs.cs.princeton.edu/java/home/
- abstract class vs. interface: "Interface are used to represent adjective or behavior e.g. Runnable, Clonable, Serializable etc"
- "classes to provide Market Data": "MarketData should be composed with a MarketDataProvider by using dependency injection. So when you change your MarketData provider Client won't get affected because they access method form MarketData interface or class."
- "What is main benefit of using factory pattern ? Where do you use it? Factory pattern’s main benefit is increased level of encapsulation while creating objects. If you use Factory to create object you can later replace original implementation of Products or classes with more advanced and high performance implementation without any change on client layer. See my post on Factory pattern for more detailed explanation and benefits."
- "The factory methods are typically implemented as virtual methods, so this pattern is also referred to as the 'Virtual Constructor'."
Email: Java
- Top 40 Core Java Interview Questions Answers from Telephonic Round http://www.reddit.com/r/programming/comments/3kvoy9/top_40_core_java_interview_questions_answers_from/
Email: Java sites
- 10 websites that help Java developers daily
- http://codeinventions.blogspot.com/2014/12/Most-Useful-websites-that-help-Java-developers.html
Email: C++ to Java
- This tutorial is intended for students who are already familiar with C++ and with data structures, and are interested in learning Java. http://pages.cs.wisc.edu/~hasti/cs368/JavaTutorial/
- Difference between Java and C++ Constructor - Interview Question http://javarevisited.blogspot.com/2015/09/difference-between-java-and-c-constructor.html
- BTW, if you are from C++ background and looking for a good book to learn Java then check out Core Java, Volume 1 by Cay S. Horstmann.
Exceptions
- https://docs.oracle.com/javase/tutorial/essential/exceptions/index.html
- "Here's the bottom line guideline: If a client can reasonably be expected to recover from an exception, make it a checked exception. If a client cannot do anything to recover from the exception, make it an unchecked exception."
Java Varargs
Singleton in Java