Showing posts with label JAVA. Show all posts
Showing posts with label JAVA. Show all posts

Saturday, July 30, 2011

Dialog Box in JAVA

import javax.swing.JOptionPane;

class dialogbox{

    public static void main(String args[])
    {
        JOptionPane.showMessageDialog(null,"Helloo","THE Title",0);
        JOptionPane.showConfirmDialog(null,"Is it Okkk??","Confirm");
       
    }

}

Sunday, April 10, 2011

Databases used in JAVA

Java is a software development tool used to make Web, desktop and mobile applications. Databases are the central component for dynamic content, so Java supports connecting to the common database solutions. Java is capable of connecting to Oracle, MySQL and SQL Server databases. The Java language connects using the JDBC driver available in the Java library.

MySQL

  • MySQL is a popular database solution. MySQL continues to be popular due to its affordable price (free for home users), and the availability of plug-ins and content tools. Many blogs such as Blogger and Wordpress use the MySQL database solution to host dynamic content. MySQL is also used for free Web forums such as PHP BB. The Java JDBC connects to MySQL and allows developers to run stored procedures, inline SQL and table creations within the Java application.

SQL Server

  • SQL Server is a database solution distributed by Microsoft. SQL Server has several versions still used in small to large businesses such as 2000, 2005 and 2008. SQL Server is used with the Microsoft .NET framework, which allows developers to code in several languages. Java also supports the Microsoft SQL Server environment using the JDBC driver. Using the JDBC Java drivers, developers can execute stored procedures, views, table creation and deletions and even maintain SQL Server security and user permissions.

Oracle

  • Oracle is a back-end database solution for large enterprises. Oracle is also commonly used in telephony environments, so it is commonly used to host PDA and mobile communications content. Java is used heavily in the mobile phone industry, so it works seamlessly with the Oracle database server. Connecting Java to an Oracle database uses the same JDBC driver connection, so Java developers can connect to several database platforms together. Since Oracle database environments sometimes use other solutions such as MySQL or SQL Server for Web content, the Java developer can implement a heterogeneous connection to Oracle and other databases together.

Saturday, April 9, 2011

JAVA History

Java is a general purpose, object-oriented programming language developed by Sun Microsystems of USA in 1991. Originally called Oak by James Gosling, one of the inventors of the language, Java was designed for the development of software for consumer electronics devices like TVs, VCRs, toasters and such other electronics machines. The goal had a strong impact on the development team to make the language simple, portable and highly reliable. The java team which included Patrick Naughton discovered that the exiting languages like C and C++ had limitation in terms of both reliability and portability. However, they modeled their new language Java on C and C++ but remove number of features of C and C++ that were considered as source of problems and thus made Java a really simple, reliable, portable, and powerful language.  


The most striking feature of the Java language is that it is a platform-neutral language. Java is the first programming language that is not tied to any particular hardware or operating system. Programs developed in Java can be executed anywhere on any system. We can call Java as a revolutionary technology because it has brought in a fundamental shift in how we develop and use programs. Nothing like this happened to the software industry before.

Sunday, July 4, 2010

Bytecode - "How it looks???????? ????? !!!!!"

Hi.....friends,

So,..............in our mind, we have some confusion that how actually byte code looks????
Some people says, it is just like 0 and 1 but the question is 0 and 1 are represents the machine code.
Here, I tried to solve this puzzle with showing this image.

  Lets do some practice by simple java program.

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

ok. So what? What about byte code?


The Resulting Byte Code

Compiled from "SimpleProgram.java"
public class SimpleProgram extends java.lang.Object{
public SimpleProgram();
  Code:
   0: aload_0
   1: invokespecial #1; //Method java/lang/Object."":()V
   4: return

public static void main(java.lang.String[]);
  Code:
   0: getstatic #2; //Field java/lang/System.out:Ljava/io/PrintStream;
   3: ldc #3; //String Hello World!
   5: invokevirtual #4; //Method java/io/PrintStream.println:(Ljava/lang/String;)V
   8: return

}