Skip to main content

Posts

Showing posts from 2012

How to make a Command in Linux

You can run your program as a command means you don't have to suffer from the path where you saves your programs for this you have to only do following three steps:- 1. Create program file , 2. Change the mode of file or give the execute permission , 3. move the file into bin directory. Example 1. vim filename 2. chmod 755 filename 3. mv filename /bin/ Now "filename" can be run as such as command runs. #filename

Some interesting and powerful feature of PERL

Power of PERL ---- Learn just a single programming language and do with this---- 1. Dovelope your own application program , 2. System software , 3. And the big advatage of this technology is that you can do CORE PROGRAMMING , These are not enough you some more advatage that don't have any other tecchnology in a single bundle  1. Build and publish Web page, 2. Extract and mine the web for data, 3. Execute quries against a database, 4. Parse XML, 5. Create your own moduales. Why the name of PREL is PERL :- 1. The first question about this programming language is that why it’s name is PERL. Because the mean of these four alphabets are (Practical Extraction and Report language). 2. Perl is similar to shell script. Only it is much easier and more akin to the high end programming. 3. Perl is free to download  from the GNU website so it is very easily accessible . 4. Perl is also available for MS-DOS,W

Program for Simple interest in java

class SI{     public static void main(String args[]){         float Principal = 10000;         double Rate_of_interest = 4.5;         int No_of_year = 4;         double Si;         Si = Principal*Rate_of_interest*No_of_year;         Si= Si/100;         System.out.println("\n Simple interest on a Principal: "+Principal+" is "+Si+" at the rate of "+Rate_of_interest+" For time "+No_of_year+"");     } } OUTPUT  Simple interest on a Principal: 10000.0 is 1800.0 at the rate of 4.5 For time 4

Program for fibonacci series in java

class FibonacciSeries {     public static void main(String args[])     {         int N = 10;         long[] series = new long[N];         series[0] = 0;         series[1] = 1;         for(int i=2;i<N;i++)         {            series[i] = series[i-1] + series[i-2];         }         System.out.print(" Your Fibonecci series is: ");         for(int i=0;i<=N;i++)         {         System.out.print(series[i]+ " ");         }     } OUTPUT 0 1 1 2 3 5 8 13 21 44

Virtual file system......

Virtual File Systems  Virtual File Systems (VFS) provide an object-oriented way of implementing file systems.  VFS allows the same system call interface (the API) to be used for different types of file systems.  The API is to the VFS interface, rather than any specific type of file system.

How the bytecode makes portability in java?

Java solves the problem of platform-independence by using byte code. The Java compiler does not produce native executable code for a particular machine like a C compiler would. Instead it produces a special format called byte code. Java byte code written in hexadecimal, byte by byte, looks like this CA FE BA BE 00 03 00 2D 00 3E 08 00 3B 08 00 01 08 00 20 08

What is the mean of re-usability in Java ?

Object oriented programming is the most preferred programming technique now a day only due to the flexibility of re usability. Re usability is actually an attribute that makes the object oriented programming more flexible and attractive. As this programming is based on objects. Object is actually a collection of data and functions that are used to operate on that data. These objects are defined as independent entities because the data inside each object represents the attributes of object and functions are used to change these attributes as required by a program. These objects act just like spare parts of any program. Thus, they are not limited to any specific program; rather they can be used in more than one application as required. These objects are defined as an independent entity in a program, and afterward they can be used in any other program that needs the same functionality. This reuse of objects helps in reducing the development time of programs. Example: Inheritanc