Skip to main content

Posts

File IO operations with java programming language

File Management in OS File management includes files and folders creation, copy and paste operations, reading the file and writing into files and deleting the files and folders  And also reading meta data about files and folders. It may include file free space, occupied space and read/write permissions etc. These above operations are considered as file management and managed by respective operating system. GUI that represents Windows File Manager File Management with Java  Though Java is platform independent, programming language depends on native file IO resources of operating system. This is possible with the Java API support. These API are categorized into 2 types. Readers and Writers: Readers and writers does the IO operations, character by character InputStream and OutputStream: Where as InputStream and OutputStream does IO operations byte by byte Below are simple Java programs that demonstrates different File IO operations. Program for creating directory package com.all...

Demonstration of Java NullPointerException

NullPointerException causes and reasons Since Java is object oriented programming language, every thing is considered to be an object. and there is always a scope of an object to be null or "No value".  Since Java supports primitive data types, Java is not considered to be pure Java object oriented programming language.   Few Notable points about NullPointerException NullPointerExceptions is unchecked exception Please read post  Exception handling and java keywords before reading this article Usually if program tries to fetch the value from reference and finds nothing as value, then program throws NullPointerException 'Zero' is not null And empty String is not considered to be null It is not the subclass of RuntimeException class Demo code that throws NullPointerException  package com.allabtjava.blog; public class DemoNullPointerException { class BeanDemo { String name; Integer ID; public String getName() { return name; } public void s...

Evolution of Java Programming Language

Evolution of Java: First of all, The Java programming language and it's tools that we currenly using is not what actually expected. This language started as a project to give solutions for embedded devices, mobile phones and other portable peripherals.  Initially, the Java was called Oak.  Why it is Oak first..? and Why it transformed to Java..? The team of five technocrats including Dr. James Gosling and also known as Dr. Java, together working on a project, which expected to give solutions on embedded devices, portable smart devices and TV Set top Boxes etc. at Sun Micro Systems.  In the process of achieving this solution, at their breaktime, team used to relax with a coffee by having a glimpse on a scenery of Oak tree next to their facility.  Once the project has come to conclusion and in the process of giving a title to it, they noticed the Oak trees [Always observing them in their break time], they named this programming language as Oak. Oak Logo Why it transfor...