1 / 33

Java Training Institute in Noida

APTRON JAVA Training Institutes in Noida? APTRON offers Java classes with live projects by the expert trainer. Our Java training program in Noida is specially designed for Under-Graduates (UG), Graduates, working professionals, and also for Freelancers. We provide end to end learning on Java Domain with deeper dives for creating a winning career for every profile.APTRON Best Java Training with the best trainers in the world. The compiler, interpreter, and runtime environment of Java language have been developed, each with security in mind.<br><br><br>

Download Presentation

Java Training Institute in Noida

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Welcome Java Programming Language

  2. Introduction JAVA was developed by James Gosling at Sun MicrosystemsInc in the year 1991, later acquired by Oracle Corporation. It is a simple programming language. Java makes writing, compiling, and debugging programming easy. It helps to create reusable code and modular programs. Java is a class-based, object-oriented programming language and is designed to have as few implementation dependencies as possible. A general-purpose programming language made for developers to write once run anywhere that is compiled Java code can run on all platforms that support Java. Java applications are compiled to bytecode that can run on any Java Virtual Machine. The syntax of Java is similar to c/c++.

  3. History Java’s history is very interesting. It is a programming language created in 1991.James Gosling, Mike Sheridan, and Patrick Naughton, a team of Sun engineers known as the Green team initiated the Java language in 1991.Sun Microsystems released its first public implementation in 1996 as Java 1.0. It provides no-cost -run-times on popular platforms. Java1.0 compiler was re-written in Java by Arthur Van Hoff to strictly comply with its specifications. With the arrival of Java 2, new versions had multiple configurations built for different types of platforms. In 1997, Sun Microsystems approached the ISO standards body and later formalized Java, but it soon withdrew from the process. At one time, Sun made most of its Java implementations available without charge, despite their proprietary software status. Sun generated revenue from Java through the selling of licenses for specialized products such as the Java Enterprise System.

  4. The Course • Assumes familiarity with C/C or a similar highlevel programming language • Will move quickly and not dwell too much onsyntax • Will have different requirements for Graduatesand Undergraduates • Will involve both individual and paired projects.

  5. The Compilation Process • Type in Source(.java) • Compile javac filename.java • Compiler • Byte Codes(.class) • Run java filename • JVM • CPU

  6. A First Program • public class FirstProgram public static voidmain (String arguments) System.out.println(Th is is a test) System.out.println(It is on a test) • System.exit(0) • Points • Public means something is accessible byeverybody. If the class itself was NOT public itwouldn't be accessible outside of the file. • When you run a java application the class thatthe program starts in must have a main method. • System.out is about the same as cout or stdout.

  7. Statements • Assignments • Follow normal rules for precedence • () Parenthesis (grouping) • , /, Multiplication, division, remainder • , - Addition and Subtraction

  8. More Statements • Loops • while ( condition ) • do . while ( condition)

  9. More Loops • for (init condition incr) .

  10. Conditions • Conditions are Identical to C/C • lt Less Than • gt Greater Than • lt Less Than or Equal to • gt Greater Than or Equal to! Not equal • Equal • And • Or • ! Not

  11. Declarations and Types • Declarations • pe variable1, variable2, • Variable Naming Rules • Must begin with a letter, , or underscore • Must consist only of Letters, , underscores,and digitsty • Cannot be a reserved word.

  12. Primitive Types • All Primitive Types start with a lower caseletter • boolean true or false • char can hold a unicode character • byte -128..127 • short -32768..32767 • int -2147483468..2147483467 • long 64 bits (you do the math!) • float 32 bits • double 64 bits • Remember Be Careful! Bears Should Not IngestLarge Fluffy Dogs

  13. Objects • What I don't want you to do is write programsexactly like you have done in C and (sometimes)in C. • Java was designed to be based on objects • This should encourage you to look at your designsin a different way

  14. Simplistic View • Define the important pieces • Decide on the objects in your system (tend to benouns) • What does each object know? (instance variablesor attributes) • What does each object do? (methods)

  15. Class ! Object • Classes aren't objects! • Class is a blueprint or description of an object. • The object is the actual instance. It isconstructed using the Class as the guide. • Head First Java builds a dog class and we willbuild one too. Ours will differ slightly.

  16. Define The Class Using UML • UML Unified Modeling Language • Basics Class Diagrams • Relationships are indicated with connectors • Unidirectional association • Bidirectional association • Dependency • Generalization (inheritance)

  17. Building Our Class From Our UML Diagram • public class Dog • string breed, nameint weight, height • void bark () System.out.println( Woof!Woof!) • void scratch() • void beg() • void rollover() • void sit()

  18. Still Need a Main Program • Main program can be in a separate class in thiscase we will do it that way. • Remember file name should match class name!

  19. The testing class • public class Test Dog • public static void main(String arguments)Dog fido new Dog() • fido.name Fido • fido.breed Mixed • fido.height 45 fido.weight 170 • fido.bark() • fido.rollover() • System.exit(0)

  20. Arrays are Objects Too! • We haven't mentioned arrays but they tend to beobjects as well. • Declaration • int values// Creates a reference to an array • values new int 20 // Creates the array and// connects it with values. • values 0.123 // Using the array... • values 1.25

  21. Garbage Collection • Rather than making the programmer delete objectsonce they are no longer in use Java does it foryou. • The process is known as garbage collection.

  22. Programming Environments • The JDK Java Developers Kit from Sun. • Free • Command Line based • Need your own editor • Eclipse • Open Software IDE • Not Just Java (but originally so it still does agood job) • Extendable Framework • Sun Workshop • IDE • NetBeans Based

  23. Projects for This Class • Will be tested on Multiple Platforms • Will be implemented with documentation • UML diagrams • JavaDoc Comments • Will encourage you to use a code control system.

  24. Hints and Gotchas • The classes must be in files named the same asthe class (Case Matters) • Artist.java • Track.java • Album.java • When you compile (if you use javac) the compilecommand has the full name • javac Artist.java Track.java Album.java

  25. Where Can I Get The Software? • Eclipse http//www.eclipse.org/ • JDK http//www.javasoft.com/ • Java http//www.sun.com/ • Sun One Studio • I'll also make a few CDs available to keep thenet a bit less loaded.

  26. Project 1 • Description • You are to implement a login system for acompany. Users log in with a username and apassword. The system needs to keep track of thelast login time for a particular user as well asgroup membership for the user (the user may be amanager, clerical, consultant, etc). Groups maybe extended further in the future to includedetailed permissions for objects controlled bythe system.

  27. Project 1 -- Input • Your program should allow the user to input a setof groups for the system followed by a set ofusers. The user information must include theusers first and last names as well as theusername and password. It should also allow forinput of a set of groups for the user. • The application should also implement an objectthat will be responsible for encrypting thepasswords. The passwords for the users should bestored in encrypted form. When a user attemptsto login the password they type in should besimilarly encrypted and then compared to thestored password. The company has not settled onan encryption method so that you should provide aclass that has the routines for encrypting thepassword but does not actually encrypt thepassword.

  28. Project 1 -- Output • Your program should allow the testing team tologin to user accounts and, if the login issuccessful, it should print out the informationassociated with the user account (except for thepassword!). It should also allow the testingteam to dump all information (including thepasswords) to the screen.

  29. Deliverables • Turn In • A listing of your code. • E-Mail to jheuring_at_eecs.utoledo.edu • Your source files (.java).

  30. Grading • Correctness • Does the program do what it is supposed to? • Does it handle extreme cases correctly? • Coding Style (Programming Practices) • Implies indentation, readability, good choice ofalgorithms, good naming practices, reasonabledesign. • Deliverables • Did you give me what I asked for? • Can I identify it as yours? • Does it compile?

  31. Best Java Institutes APTRON JAVA Training Institutes in Noida? APTRON offers Java classes with live projects by the expert trainer. Our Java training program in Noida is specially designed for Undergraduates (UG), Graduates, working professionals, and also for Freelancers.APTRON Best Java Training Institutes with the best trainers in the world.Also, you will be learning OOPS concepts in Best IT & Professional Training Institute in Noida. Address: B-10, SECTOR-2 NEAR SECTOR - 15 METRO STATION NOIDA - 201301, U.P. (INDIA) Mobile : 7065273000

  32. Thankyou!

More Related