Seminar Topics & Project Ideas On Computer Science Electronics Electrical Mechanical Engineering Civil MBA Medicine Nursing Science Physics Mathematics Chemistry ppt pdf doc presentation downloads and Abstract

Full Version: CORE JAVA
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
CORE JAVA
[attachment=19935]
Acknowledgement
Every endeavor we understand takes an indomitable urge, perseverance, and proper guidance especially when it is most needed. Internally motivated to undertake some appreciable work as our industrial training, unsure though, but with a hope we took this project work to be completed. Initially we had hardly ever thought of, the kind of work we were going to do.
We are thankful to “Mr. Nandlal Shukla” H.O.D. of Computer Science and Engineering who has been a constant source of encouragement and helping us whenever required.
We are very much thankful to “Mr. Rohit Ahuja” under whose guidance this training has been successfully completed.
Here we think from the core, everybody who has helped us at work. In true sense, besides our guides we are indebted to many other members at SIST for their constant help and invaluable contribution on all occasions when they were most needed. Again, we find the opportunity to acknowledge our regards and thanks to our family members and friends who have been true support behind us.

ATAL RAWAT
CSE VII SEM
0125CS061032 SIST BHOPAL


INTRODUCTION
During the industrial training the topics and knowledge about the technologies which we came to know are as follow:

+ Data Types,Variables,Literals,I/O,Consructs.
+ Classes and Objects.
+ Inheritence.
+ Static,Abstract and Final.
+ String,Arrays And Command Line Arguments.
+ Interface and Packages.
+ Exception Handling.
+ Collection and Generics.
+ Applets.
+ Files and Streams.
+ Swings.
+ Multithreading.
+ Socket Programming.
+ Database.
Java Runtime Environments:
Stand-alone programs probably aren't what you'll be writing in the longer term,even though they're excellent for learning the fundamentals of Java. Later on you'll be slotting your classes into other Java runtime environments, some of which areopen source and others are commercial products.
Server side, there are a number of environment interfaces you may use. These include:
+Servlets: Executable programs with a web interface
+JSPs: Embedding server executable content within a web page
+RMI and EJBs Providing object servers
+JREs that support these interfaces include Apache Tomcat, BEA WebLogic
JRockit and IBM's WebSphere application server.
Client side, most users want to access information via their browser these days and plugins that support Java are available for most common browsers. Java is built in to certain browsers too, but do beware that it's often in old (or even ancient) versions.
AppletViewer, a part of Sun's distribution, is a JRE with the same interface that a browser provides but without the caching or overhead of a browser, and is useful for development and testing.And it turns out that the JRE that you use for stand-alone programs can do much more. You can have what looks like a stand-alone program at "the top" but have it act as a client or server (or both!). You can have it provide a graphic user interface (GUI)
Java distributions
The Java 2 Standard Edition (J2SE) provides the essential compiler, tools, runtimes, and APIs for writing, deploying, and running applets and applications in the Java programming language.
The Java 2 Enterprise Edition (J2EE) technology and its component-based model simplifies enterprise development and deployment. The J2EE platform manages the infrastructure and supports the Web services to enable development of secure, robust and inter-operable business applications. The download has essential extra classes and environments to use in addition to the J2SE, which you will also need.
The Java 2 Micro Edition (J2ME) specifically addresses the consumer space, which covers the range of extremely tiny commodities, such as smart cards or a pager, up to the set-top box. This download provides a highly optimised runtime environment.
Java standard packages
+ Much of the power of a Java application is vested not in the language itself, but in all the standard classes provided and optional classes available. There are so many classes that
they've been organized into bundles (called "packages") for
easier management.
+The first release of Java included eight packages.
+Standard package names start "java." or "javax.".
For example:
There's java.lang to provide basic language facilities,
java.net to provide network access,
javax.swing to provide the Swing GUI and javax.servlet to provide Servlet support.
You'll come across many more standard packages as you learn Java;
however, as a rule of thumb, if the
package name starts "java" or "javax", it's standard, but if it starts with something else like "com", it isn't.
Java versions
Java started off as Java release 1.0, and progressed through to Java 1.5. Sun were very conservative in moving the release numbers forward, so much so that the "1." Just became a part of the name. In summer 2004, Java 1.5 was re-branded Java 5.
Java 1.2 was a major step, with a tripling of the number of packages provided.
At that point Sun rebranded the new version the "Java 2 Platform".
Classespackages
Java 1.0 212 8
Java 1.1 504 23
Java 2 1.2 1520 59
Java 2 1.3 1842 76
Java 2 1.4 2991 135
Java 2 5.0 more more
As well as the extra packages, there have been some language changes, such as an assert statement added to the language at release 1.4.
Note that there is a very large installed base of browsers running Java 1.1, so you may still want to use it for writing simple applets. If that's the case, you'll need to obtain a copy of the JDK (Java Development Kit) for that release. The JDK became the SDK (Software Development Kit), now Java 2 SDK Standard edition, Version 1.5 or 5.0.
Methods and classes
You write all your executable java code in "methods", and all methods must be grouped into "classes".
Optionally, you can group classes into "packages" but we won't
do that until later on. A method is a piece of program code with a name. It can receive any number of input objects or primitives (known as parameters) when it is run, and it can return 0 or 1 object or primitive when it completes running.
A class is a group of methods, all of which are concerned with objects of the same type.If you're already an experienced programmer from some other language, you may think that a method sounds very much like a function, proc, sub, subroutine, macro or command, and you would be right, although there is a little more to it. Java is an Object Oriented language, where you run a method on an object.
Let's see a first Java class and method in a form that we can run it as if it was a standalone
program:
//Tiniest of programs to check compile / interpret tools
public class Hello {
public static void main(String[] args) {
System.out.println("A program to exercise the Java tools");}}
Core Java

[attachment=27459]

CORE JAVA-OOP CONCEPTS

What is Object Orientation ?
Similar kinds of Objects which have common properties and behavior can be group together as a single unit in a class. This concept is known as Object Orientation. This approach is known as Object Orientated Approach.


Definition:

The methods that does not have any method body ( that is the method definiton) are called abstract methods.

abstract <data type> method-name(parameter-list);
Any class that contains one or more than one abstract methods must also be declared abstract .To declare a class abstract ,you simple use the ‘abstract’ keyword in front of the class keyword at the beginning of the class declaration.


Interfaces


Interface is nothing but a prototype.


All the methods in an Interface are abstract. An Interface can not have any non-abstract method.
Using the keyword interface.
Interfaces are fully abstract.


Accessing Shared Resources

Applications Access to Shared Resources need to be coordinated.
Printer (two person jobs cannot be printed at the same time)
Simultaneous operations on your bank account.
Can the following operations be done at the same time on the same account?
Deposit()
Withdraw()
Enquire()