Apr 07, 2011 — 0 comments
Comprehensive Synchronization tutorial in Java. synchronized keyword is used to provide mutual exclusion and visibility guarantee in mufti-threaded environment. In order to use synchronized keyword properly you need to remember which object your code is locking etc.
This article is about how to do logging in Java, how to use log4j and some practical logging tips in Java. this is more a collection of experience, best practices and provides a developers view on java logging. Its critical to use correct logging level, correct format and know which information to log.
Java tutorial on how to find memory usage in java with example. step by step guide to get free memory, max memory and total memory from JVM by using various utility method provided in Runtime class. accuracy of those method are also discussed in order to avoid misinterpretation of result.
Java tutorial of quick practical tips to improve performance of Java application which has database in back end. database is main source of slowness and by minimizing database calls, improving query performance by introducing indexes, using preparedStatement you can improve performance of Java application.
Java tutorial on what is assertion in java and why should you use assertion to improve code quality. Also Assertion in java is fairly underused feature but if used carefully can complement both Unit Testing and Exception handling. Since Assertion sits on code its gets more expose than unit testing and can test your function with more real data than one or two test data.
Java tutorial to find out if any file is hidden or not. while writing file system code its easy to become platform dependent, in order to avoid that use File API from JDK. it provides isHidden() method to check if file is hidden in java.
Making code thread-safe in java is bit of challenge in Java, you need to be expert in multi-threading in order to write correct concurrent code in java. finding and fixing race conditions in java are very costly and result is some very frustrating subtle bug in Java. this article will help you to write thread safe code in java.
This is also a very popular java interview questions mostly asked as how to reverse string in Java without using Stringbuffer reverse but There are many different ways to solve this problem using recursion and in this article we discuss one of those way to reverse string in Java.
Java provides different kinds of variable e.g. Class variable or Static variable, Instance variable or non static variable, Local variable. In this article we will see some difference between Class variable also called static variable and Instance variable also called non static variable in Java. indivine index
Java provides multiple ways to compare two Dates in Java. here we will see 3 simple example to convert two dates in Java and find out whether one date is before, after or in between two dates.
Help us out! More and more tutorials are submitted to Good-Tutorials each day. We could use your help with finding good tutorials. Mind lending a hand?