Powered by Blogger.

Read a file using BufferedReader and Scanner in Java

>> Thursday, July 2, 2015

Being a java developer, will get a chance to work with files using java.util and java.io packages. So mostly we use BufferedReader and Scanner Classes to read different files. These classes will contain respective methods to read files. Here, we will go through the classes and their's differences with a simple java program.

Read more..

Best practice to find Duplicate Character from a String in java

>> Sunday, June 28, 2015

This program could be the best way to find the number of duplicate characters from the given String. Here we are using Map and Set from java.util.Collections package. In the below program we are using Set to collect different characters from the given String. One boolean variable and one method named as findDuplicateChar(String myString) to find the duplicates. Also some known methods like toCharArray() to convert String to character array and for-each loop to iterate Set and Array. Better you can go through the given program to find duplicate characters from the given String.

Read more..

What are Generics in Java

>> Saturday, March 28, 2015

In common term Generic means a common type of things or relating to a class or group of things not specific.

In Java Generics are introduced in 2004 within Java 5.0 features along with Enum, autoboxing and varargs , to provide compile time type-safety.Java Generic methods and generic classes enable programmers to specify, with a single method declaration, a set of related methods or, with a single class declaration, a set of related types, respectively.
What is type-safety?
It is just a check by compiler that correct Type(datatype) is used in correct place and there should not be any ClassCastException.

Read more..

Static Import in Java with an Example

>> Thursday, December 25, 2014

What is Static Import:
Static Import is a feature added in Java 1.5(released in Sep 30 2004 almost 10 years back!) along with Var-args,Auto-Boxing and Auto-Unboxing, Generics, Enhanced for-loop,Enums,Scanner Class and Annotations. Using this Static Import feature we can import static members of a class and as well we can access all non-private static members without using class name from other classes.

Read more..

Core Java notes by Mr.Ratan from Durgasoft

>> Monday, December 1, 2014

Mr. Ratan is a faculty for Core Java from Durga Software Solutions. He covers all the topics in core java including AWT,Swings. He will give training for OCJP exam preparation tips in the Core Java class. This will be useful to write exam without preparing dumps. Mr.Ratan will explain the classes in slow manner to understand easily for beginners. You can watch a demo class of Mr.Ratan.
Core Java notes by Ratan_JavabynataraJ

Read more..

Different type of Vararg rules in Java

>> Tuesday, November 25, 2014

While writing methods using variable arguments(var-args), we may confuse in different scenarios like where to put var-args in the parameters and how to place different type of arguments.Here we have given some rules with scenarios to understand easily. This will help you in the SCJP examination and as well, java interviews for freshers and experienced guys.
varargs rules JavabynataraJ

Read more..

About Author

My Photo
Muralidhar Nayani
Hi this is Muralidhar, i am living in Chennai. I have been working in Java and JEE technologies. I like to share the java programs and materials from different institutes and free eBooks to download.
View my complete profile

Random Posts

© javabynataraj.blogspot.com from 2009 - 2014. All rights reserved.