Friday, August 15, 2014

Posted by Anmol Sharma
In the previous article, we discussed about two basic file handling functions in Java including searching for an existing created file in the system and creating a file using java’s inbuilt function. In this article we will cover up the other two file handling operations which includes reading from a file and writing to a file using java’s own methods. In this program we create a file by specifying a file name, open it at the same time and add...

Thursday, August 14, 2014

Posted by Dollar Dhingra
Hello There, this is the first part of the series Pattern Programming Questions. The First Part is specially for beginners who are new to programming and have basic understanding of loops and printing functions. In this part, I will walk you through some basic patterns. Pattern Questions are not only the frequently asked questions in the interviews but also help you in developing the basic logic in programming. I will explain you some of the basic ones, and leave the rest for you to try. Following patterns will be covered: Pattern 1: ***** *****...

Tuesday, August 12, 2014

Posted by Anmol Sharma
Java provides File class in ‘java.io’ package for handling all basic and necessary file operations and methods used for file handling like reading the contents of a file, writing to a file, searching for a file, determining the path of the file stored on a disk, etc. File class contains number of methods for performing specific operations on a file, few of which are used in this article. In this program, the user is checking for the existence...
Posted by Anmol Sharma
Exception handling in java is similar as in C#. There are couple of differences like java allows checked exceptions which are handled by the caller of the program. Another minor difference is in the finally statement which can have return and break statement which is not the case in C#. Refer to previous article for Introduction to Exception handling Exception Handling Basics in C# Following code illustrates the basic concept of exception handling...