Showing posts with label Java. Show all posts
Showing posts with label Java. Show all posts

Sunday, 20 April 2014

A Simple Client-Server Chat Utility in Java


   In this post I have added the Client and Server Programs in Java to implement a very simple chat utility.

Figure Below Shows the GUI of a Chat Client





Monday, 11 March 2013

Java Development Kit (JDK)

  Java Development Kit ( JDK ) contains a collection of programming tools for Java Developers. Here in this post I am discussing about a few useful tools in JDK.
  • appletviewer - appletviewer runs Java applets without the help of a java enabled web browser.
  • javac - javac is the Java Compiler which produces Byte code from the Java Source code.
  • java - java is the Java Interpreter which runs the Byte code produced by the Java Compiler javac.
  • javah - javah produces header files to use with native methods.
  • javap - javap is the Java Disassembler which enables us to convert Byte code files into a program description.
  • javadoc - javadoc creates HTML format documentation from Java Source code files.
  • jdb - jdb is the Java Debugger.

Differences between Java and C++

  In this post I am discussing about the main differences between Java and C++. The subject is not covered thoroughly.
  • Java is a pure object oriented language, while C++ is basically C with object oriented extension.
  • Java does not support operator overloading.
  • Java does not have template classes as in case of C++.
  • Java does not support multiple inheritance of classes. To achieve multiple inheritance Java uses interface.
  • Header files are not there in Java.
  • There are no global variables in Java.
  • Java does not use explicit pointers.
  • In Java destructors are replaced with finalize( ). 

Saturday, 9 March 2013

Differences Between Java and C

  In this post I am listing out some differences between Java and C. Of course it does not cover all the differences between Java and C.

  • Java is an Object Oriented Programming Language, where as C is a Procedural Programming Language.
  • Java does not have the C Keywords sizeof and typedef.
  • There are no structures and unions in Java. Consequently the C Keywords struct and union are absent in Java.
  • Type Modifiers auto, extern, register, signed and unsigned present in C are not there in Java.
  • Explicit pointers are not supported in Java.
  • There is no preprocessor for java. So statements like #define, #include etc are absent in Java.
  • In Java functions with no argument must be declared with empty parenthesis. In C this can be done by using the void keyword.
  • New operators such as >>> and instanceof are added in Java.
  • Java supports labelled breaks and continue statements.
  • New data types like boolean, reference etc. are added in Java. 
  • Many new keywords like private, protected, public etc are added in Java.