Tuesday, 7 January 2014

Why is Java Strongly associated with the Internet?

Java  is strongly associated with the Internet because the first application program written in Java was HotJava,a browser to run the applet on Internet .So the Internet users use the Java to create the applet programs and run them locally using a 'Java-enabled browsers' like HotJava..The users can use the 'Java-enabled browsers to download the applet located on the computer system anywhere in the internet ans run it on their computer.

Downloading a applet via internet


So the Internet users  start setting up the their web sites  containing Java applets that could be used by the other remote internet users .So this ability make the Java programming language popular among the Internet programmers ,so the Java is popularly known as 'Internet Language'.



Wednesday, 25 December 2013

List a few major difference between C++ and Java

There are following some difference between C++ and Java:-

What is multithreading ?How does it improve the performance of the Java?

Multithreading means handing multiple tasks simultaneously,like listing to an audio song while downloading a file from a distent computer.Java support multithreading.Java programs can be written to support multithreading. In Java two programes can be run to do different tasks,like to show the GUI graphics to the user and simultaneously read a file from the hard-disk.So it make the application run smoothly,so that the performance will be better.

How java is more secure than other languages?


Java is more secure because of following reasons:-
  • No use of pointer :-
  •             Java do not use the pointers like other languages c,c++.(pointers are variables which holds the memory addresses).These pointers leads to unauthorized access to the memory blocks if some other program get the pointer values,and can change and manipulate the data stored in the systems RAM.But java does not use the pointers,it has its internal mechanism to manage the memory management .Java give the access to the data to the programs which has proper verified authorization.
  • Concept of error handling and exception handling :-
  •           Java provide the exception handling concept which capture series errors and eliminates any risk of crashing the system.Java compiler check all the code lines and check that if there is any line of code that may create error and give warnings to the programmer like "deprecated methods and classes",so that the more effective program can be written by doing changes in the program .It checks the at the time of execution and may create the exception ArrayIndexOutOfBoundExceptionso that these exceptions can be handled without program crash ,and unauthorised memory contents are not accessible and modifiable by any other programs.
  • Strict Data Type Checking:-Java compiler strictly check the data type that is defined to the variables in the program ,so that there unboxing and unboxing operations can not lead to security issues.Java provide wrapper classes to use in place of primitive data types like Integer class to use instead of int data type ,there are many more.
  • Garbage Collector:-Java has its internal garbage collector that automatically deallocate the variables and objects that go out of scope ,so that the and security issue may lead ,and it also effective to put the memory management task in the hand of Garbage Collector ,because the programmer may do mistake in programming logic(like left destruction of objects and pointers)  that may lead to loophole in the security of program.But java is secure in this case.

Friday, 6 December 2013

Why is Java known as platform-neutral language?

Java is known as platform independent because it uses the concept of  generating the byte code of the high level program ,and then run that byte code(intermediate code) on JVM(Java Virtual Machine),now what is JVM,actual JVM is a virtual computer system that run on your original computer system .
   JVM converts the byte code to machine code according to the your original computer's machine architecture(your computer system architecture like x86,ARM etc.).Here is flow how the Java handle your high level program.



      So java compilation is done only once ,after that the byte code can be interpreted on any machine that have JVM.JVM is of different type according to computer system architecture,means for x86 JVM will be different for ARM JVM will be different etc.These are developed by the java vender that is Oracle.This JVM come as a part of JDK(Java Development Kit).
So this compiler and interpreter has make it platform-neutral language.  

Friday, 6 September 2013

List of a few areas of application of OOP technology


  • Now a days OOP is most popular technology among programmers.It is used in the area of designing of user interface windows of every software .


Like:-


In above the design of textbox labels buttons etc are developed using Object Oriented Programming ,because it easy to co relate there working in the manner of Objects. So today all the software development is done in OOP .



  • Real time systems are much complex and contain many more objectives with complicated attributes and methods. So in real time systems OOP is useful because it can simplify a complex problem.We can create complex objects in OOP and can create there communication methods and can get the results .In the coming post we will create Real time objects and see there working  also.

  • Simulation and modelling applications can be created using OOP because in OOP we can handle real time objects and can generate there behavior  in simulation system also.

  • Object Oriented databases are good application of OOP ,in object oriented databases we can handle objects easily,object data can be processed easily.

  •  There are other applications of OOP are:-
  • AI and expert systems 
  • Neural network 
  • Parallel programming
  • Decision Support Systems
  • CIM
  • CAD etc.

Friday, 30 August 2013

What kind of things can become objects in OOP?

When we start programming in OOP(Object Oriented Programming) the things which have some attributes and have some functions will become objects.Here is a example to check that what will become a object:-

Example :-

       Let say you are going to develop a software for the School to take attendance on computers ,so you will start programming in object oriented .You will analyse that in attendance what are the things which have attributes and some functionality.These things will come in your mind like Student,Teacher,Register etc.
    You will analyse that when attendance is taken the teacher take the attendance ,student speak that I am present and register is used to mark the attendance.





So the Program will have following things:-


class Student
{
     string  sName ;
     int      sRollNo;

}
class Teacher
{
      string TeacherName;
}

class Register
{
        Student   StudentList[20];
}