Sample of java program



Sample of java program to print " Hello Java" on screen with short

 description to easy understand the java program.


Sample Program


public class Hello
{
public static void main ( String args[] )
{
System.out.println("Hello Java");
}
}


     class name and file name are same.

     public is a access specifier this define the scope of the method or class.

     static means that method is associated with the class, not a specific instance(object)
     of  that class.

    void specify the return type of the method.

    array args[] is a String array use to get value from command line argument.

    In System.out.println()
            - System is a in-built class which is present in "java.lang" package.
    - out is a static final field (ie, variable) in System class which is of the type
               PrintStream ( a built-in class, contains methods to print the different data values ).
    - println() is a method use to print any message in nee line. we also use print()
               method is to print message is current line.

    how to compile ?
    javac programName.java;
    ex:-  javac Hello.java;

    how to Run ?
            java MainClassName;
    MainClassName means class which contain main method.
    ex:- java Hello

    O/P :-

































Basic Commands for Unix

 Hello friends, Here I am going to explain you all the basic command for the Unix. So you can handle system or access the data through the terminal.

       Commands :


>>Basic Commands


1)  cal : 

The cal command is used to to display the calender.
For example to check calendar you need to type cal command as follows:

               

2) passwd

The passwd command is used to change the password of the unix system. Every unix system will require a password for the security.





3) whoami, who, user

The who am i  command is used to know the name of the user by which you are currently logged in.
The who command is used to know the name of the user who are online on connected system.
The user will display the name of the users.



                                >> File Management Commands<<

4) ls command

The ls command is used to list the directories and files of the current running directory with the 
-l option.
As shown below example d stands for the directory and - is for the executable file like text file, image or any other format.




5) cat

The cat command is used to read the file. We can also create the file with the cat command by using >  sign with it. as seen below example :




6) wc (word count) command

The wc command is used to count the number of characters, words and lines of any file.
In wc  command -c for character, -w for word count and -l for line count

Syntax  $wc <filename>





7) cp command

To make a copy of a file use the cp command. The basic syntax of the command is:

Syntax :
                  $ cp source_file destination_file





8) mv Command 

The mv command is used to rename the filename

Syntax :
                 $ mv old_file new_file




9) rm Command 

The rm command is used to remove the particular file.
It is recommended to use -i option along with rm command.

Syntax :
               rm <filename>




Step to set the the path of JDK (Java Development Kit)

Step 1.  Download JDK ( Depend on your windows version compatibility ).

Step 2.  Install JDK.

Step 3.  Set the System variable path (eg. Win8).

          Open MyComputer properties.


  Click on "Advance System setting".


Click on "Environment variable..".


Drop-down list of "System variable" select the variable "Path".  
          Click on edit button.

 
Set the cursor on last position in variable value.
          Then write semicolon(;) then write the path of bin folder of JDK.


Basic of Java

Introduction

        Java is an object oriented programming language and a platform developed by the  James GoslingMike Sheridan, and Patrick Naughton initiated the Java language project. The small team of sun engineers called Green Team. in June 1991.
It is a fully platform independent language  

Platform Independent  Any hardware or software environment in which a program runs, known as a platform. Since Java has its own Runtime Environment (JRE) and API, it is called platform
                    Thus the system which have a support to the java platform can run the java program their is no any changes is required in the program. Their is only the java class files are used which are a intermediate code generated by the compiler.
                      In java the Intermediate code is generated by the Compiler are used by the Java Virtual Machine (JVM)  and it  converts its into the machine code to execute the program.

Kernal : The Heart of OS



             The KERNAL was initially written for the Commodore PET by John Feagans, who introduced the idea of separating the BASIC routines from the operating system. It was further developed by several people, notably Robert Russell added many of the features for the VIC-20 and the C64.
             In computing Kernal is the main component of most operating system. The kernal also known as the heart of an OS.It is working as a bridge between the application and the actual data processing done at the hardware level.
            As a collection of programs written in 'C language'  that directly interact with hardware and most of manages the task like memory management , task scheduling, process management, Device management and file management, etc ....but the kernal is a program that constitutes the central core of the computer OS.It has complete control over everything that occurs in the system.
           When the system starts, the kernal is being first loaded into the memory during the boot time and it should be remains their for the entire duration of the computer session, because the services of the kernal requires continuously. The kernal is the part of OS which is responsible for all other operations.
           Unix kernal is directly above the hardware kernal manages all hardware  devices and controls programs run on the computer it is loaded into the memory when system is booted.

How Kernal works?


          When a computer boots up, it goes through some initialization functions (Like Memory checking). Then it loads the kernal and switch the control to it. Then the kernal starts up  all the required processes needed to communicate with the user and the rest of the environment (e.g. LAN).
          The kernal itself does not interact  directly with the user but rather interacts with the shell and other programs as well as with the hardware device on the system including the CPU, Memory and Disk drive.
A kernal can be contrasted with a, which is the program that interacts with user commands.
       

Way to keep secure E-mail


E-mail is the most widely used forms of communication today. E-Mail is a method of exchanging the digital information from one end to another end. We know that E-Mails are very popular in our daily routine. In the past, when we don’t have an Internet, What we do for the communication? Yeah, Off Course letters being sent from one place to another place or one person to another person, but the letters aren’t secure, but how?

Suppose someone sent you a letter which contains your confidential information and there may be a chance that it may be lost or theft by someone. So these aren’t secure way to transfer the confidential information. Later when we enter into the world of internet then E-Mails are used to exchange messages but with the advancement of internet there is a risk of theft your E-Mail or Hack your E-Mail.

So, To Prevent from E-mail Hijacking we must keep our E-Mails Safe. In this article we are going to read How can we keep our E-Mail Safe ?

There are total 5 ways from which you can keep your E-Mails Safe and minimizing the mishappening with your mail list. 

Go Off Records

If you really want to keep your E-Mails secret then just activate the Go Off Record button from your G-Mail chat box. If you are using Gmail then you can also activate this feature from the GTalk or other IM Chat Messenger. After activating this features whatever you typed-in from the keyboard will not save in your E-Mail Account.

Stop using Draft

If you are using the draft service to save your message or private information so you should stop it from now. Because it can be read by anyone, but how? Let’s discuss with an example

Suppose you have an urgent piece of work on the internet and your internet is not working, what will you do? Off course you have to go to the cyber cafe, and in the cafe you open your E-Mail account and by mistake you didn’t log-out your E-Mail account, now anyone who sits on your seat can open your E-Mail account, check your draft folder and theft your confidential information.

Use 2-Step Verification

This is the best way to keep your E-Mail Safe. If you are using G-Mail then there is a best option for you to activate 2-step Verification in your G-Mail account. After activating this option no one can log-in into your G-Mail account even though he/she knows your password.

Use password protected zip files

If you are sending some private or confidential information to anyone then always use password protected zip files. This will keep your E-Mail message safe. By chance if anyone theft your file which is password protected then he/she cannot open that file. So this is how, you can safe your E-Mails safe.

Hide your files in image

There is an another cool way to keep your E-mail safe i.e. hide your files with images then send it to the recipient. But how is this possible? Yeah, it is possible let’s see,

To hide files in image you have to go through some steps so get ready-

Gather all files (which you want to hide) in a specific folder I recommend C:\private

Then compress all files to .rar extension and named it like hello.rar and this hello.rar should also be in the same directory i.e. private.

Now pick any .jpeg file (for ex- abc.jpeg) from your computer and put that image file into that directory.

Open command prompt (click on start-> Run-> cmd) and go to the present working directory that is C:\private

Then type a simple command

copy /b abc.jpeg + hello.rar output.jpeg

now your hello.rar folder is hidden in the output.jpeg and if you click on the output.jpeg file then an image will be open. This is the best way to keep your E-Mail safe, if your E-Mail is hijacked even then no one can theft your confidential information.