1 / 13

Alpha training center

Alpha Training Center is a india based web development company that provides best IT- courses and Technologies like PHP,.NET,JAVA,ANDROID,SEO. We additionally furnish live extend preparing for people and professional.Our mission is to bridge the gap between organizations, institutes and the software industry. We assemble talented experts out of all our trainees and that is our sole point.

Télécharger la présentation

Alpha training center

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. java COURSE 401, VitthalComplex,Opp. SakarSchool,New C.G Road,Chandkheda,Ahmedabad-382424. Phone : +91-8866403111 Email :contact@alphainfoways.com Website : www.alphainfoways.com Alpha training center

  2. Why Java? • It’s the current “hot” language • It’s almost entirely object-oriented • It has a vast library of predefined objects and operations • It’s more platform independent • this makes it great for Web programming • It’s more secure • It isn’t C++

  3. Applets, Servlets and Applications • An applet is designed to be embedded in a Web page, and run by a browser • Applets run in a sandbox with numerous restrictions; for example, they can’t read files and then use the network • A servlet is designed to be run by a web server • An application is a conventional program B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173 javatraining.vibranttechnologies.co.in enquiry@vibrantgroup.co.in

  4. Java Virtual Machine • The .class files generated by the compiler are not executable binaries • so Java combines compilation and interpretation • Instead, they contain “byte-codes” to be executed by the Java Virtual Machine • other languages have done this, e.g. UCSD Pascal • This approach provides platform independence, and greater security B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173 javatraining.vibranttechnologies.co.in enquiry@vibrantgroup.co.in

  5. HelloWorld (standalone) public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!"); } } • Note that String is built in • println is a member function for the System.out class B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173 javatraining.vibranttechnologies.co.in enquiry@vibrantgroup.co.in

  6. Java program layout • A typical Java file looks like: import java.awt.*;import java.util.*; public class SomethingOrOther { // object definitions go here . . .} This must be in a file named SomethingOrOther.java !

  7. So, what is a class? • A class consists of • a collection of fields, or variables, very much like the named fields of a struct • all the operations (called methods) that can be performed on those fields • can be instantiated • A class describes objects and operations defined on those objects B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173 javatraining.vibranttechnologies.co.in enquiry@vibrantgroup.co.in

  8. The Java Virtual Machine. Traditionally, source code had to be compiled for the target hardware and OS platform: Windows Compiler i386 binary Solaris Compiler SPARC binary Source.cpp Mac Compiler PPC binary B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173 javatraining.vibranttechnologies.co.in enquiry@vibrantgroup.co.in

  9. Name conventions • Java is case-sensitive; maxval, maxVal, and MaxVal are three different names • Class names begin with a capital letter • All other names begin with a lowercase letter • Subsequent words are capitalized: theBigOne • Underscores are not used in names • These are very strong conventions! B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173 javatraining.vibranttechnologies.co.in enquiry@vibrantgroup.co.in

  10. The Java Virtual Machine. Java source files (.java) are compiled to Java bytecode (.class) Bytecode is interpreted on the target platform within a Java Virtual Machine i386 VM Java Compiler Source.java Java Bytecode Source.class SPARC VM PPC VM B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173 javatraining.vibranttechnologies.co.in enquiry@vibrantgroup.co.in

  11. Packages • Like “namespace” in C++ • How to use: • C++: using namespace xxx • Java: import xxx, or import xxx.xx B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173 javatraining.vibranttechnologies.co.in enquiry@vibrantgroup.co.in

  12. 1 <html> 2 <applet code="WelcomeApplet.class" width=300 height=30> 3 </applet> 4 </html> A Simple Java Applet: Drawing a String • appletviewer only understands <applet> tags • Ignores everything else • Minimal browser • Executing the applet • appletviewer WelcomeApplet.html • Perform in directory containing .class file B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173 javatraining.vibranttechnologies.co.in enquiry@vibrantgroup.co.in

  13. Where to Get More Information Anything Technologies & Computers : www.anythingitsolution.com AnythingHR Team www.anythinghrsolution.com B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173 javatraining.vibranttechnologies.co.in enquiry@vibrantgroup.co.in

More Related