Input-Output Fundamentals in JAVA 5

Serialization:- Saving the object to some type of permanent storage is called as persistence. An object is said to be persistent capable when you can store that object on a disk or a tape or send it to another machine to be stored in memory or on disk. The non persisted object exists only as long as the Java Virtual Machine is running. The Serialization is a mechanism for saving the objects as a sequence of bytes and later, when needed, rebuilding the byte sequence back into a copy of the object. For…Read more

I/O Fundamentals in JAVA 4

I/O Stream Chaining:- A program rarely uses a single stream. Instead, it chains a series of streams together to process the data. The given below demonstrates an example input stream; in this case, a file stream is buffered for efficiency and then converted into data (Java primitives) items. This is an input stream chain example Data Source è FileInputStream => BufferedInputStream => DataInputStream è Program And given below demonstrates an example output stream; in this case, data is written, then buffered, and finally written to a file. This is an input stream chain…Read more

How Can You Heal the Internet?

­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ARE YOU FRIGHTENED OF VIRUSES!!!!!!!!! GET A REMEDY…. What do you think happens when you connect your computer to the Internet? In less than an hour, it may not be yours anymore. While you're Goggling your name and checking e-mail, a hacker, perhaps in Eastern Europe-let's call him Paji-quietly takes over your machine. There are a dozen ways Paji could do it, but he probably found you with a program he didn't get at Best Buy called a port scanner, which roams the Internet like a clumsy cat burglar, trying every doorknob until…Read more

What about theory of AI?

     Inquire about in AI used to envelop two sides: a down to earth side concerned with building capable programming that re-makes a portion of the brain's issue comprehending capacities, and a hypothetical side, where programming and thoughts from figuring are utilized as devices to help grasp the psyche. AI's viable side presses on to flourish, however its hypothetical side has moped in the wake of handing down a mixture of splendid and abominable thoughts to logic and cognitive brain research. This aspect of AI examination has give or take closed down…Read more

I/O Fundamentals in JAVA 3

Node Stream:- In the java JDK, there are three fundamental types of nodes, Files Memory (such a arrays or String objects) Pipes (a channel from one process or thread [a light-weight process] to another; the output pipe stream of one thread is attached to the input pipe stream of another thread) It is possible to create new node stream classes, but it requires handling native function calls to device driver, and this is non portable. Below shows the node streams: Type Character Streams Byte Streams File FileReader FileInputStream   FileWriter FileOutputStream Memory Array…Read more

Do You Know What is Peripheral Component Interconnect

This article gives the information of PCI. PCI or peripheral component interconnect standard specifies a computer bus for attaching device to a computer motherboard. The PCI bus is a high speed bus that connects high performance peripherals like video adapter, disk adapter, and network adapter to the chipset, processor and memory. Unlike previous buses that linked tightly the processor to the expansion slots, the PCI bus electronically isolates the processor from the PCI expansion slots.  This allows more PCI slots to be supported and removes performances constraint on the use of those slots.…Read more

Hadoop learning

 Question: Why do we need Hadoop at all?  Answer: Suppose you have 1GB of data that you need to process. The data is stored in a traditional relational database in your desktop computer and this desktop computer has no problem handling this load. Then your company expands and that data grows to 10 GB. And then 100 GB. And you reach the limits of your current desktop computer. So you scale your DB by investing in a larger PC. When your data grows to 10 TB, and then 100 TB. And you are fast…Read more

I/O Fundamentals in JAVA 2

I/O Stream Fundamentals:- A stream is a flow of data from a source to a sink. Typically, our program is one end of that stream, and some other node (for example, a file) is the other end. Source and sinks are also called as input streams and output streams, respectively. We can read from an input stream, but we cannot write to it. Conversely, we can write to an output stream, but cannot read from it. Following table shows the fundamental stream classes,   Stream Byte Streams Character Streams Source streams InputStream Reader…Read more

I/O Fundamentals in JAVA 1

Command Line Arguments:- When a Java technology program is launched from a terminal window, we can provide the program with zero or more command line arguments. Those command line arguments allow the user to specify the configuration information for the application. These arguments are strings; either standalone tokens, such as arg1, or quoted strings, such as “another arg”. The sequence of arguments follows the name of the program class and is stored in an array of String objects passed to the static main method. The code given below is to test the command…Read more

Generics in JAVA 2

Generic Map Example:- The MapPlayerRepository class in a given code shows a more practical way to use a generic collection. The program creates a repository of players. It declares a variable (players) of type HashMap<String, String> which stores players based on their position and name. It defines two methods put() and get() to add the elements to the map repository and to retrieve the elements from the map repository respectively. import java.util.*; public class MapPlayerRepository { HashMap<String, String> players; public MapPlayerRepository() { players = new HashMap<String, String>(); } public String get(String position) {…Read more