|
To access the contents, click the chapter and section titles.
Sams Teach Yourself Visual J++ 6 in 21 Days
Q&AQ Whats the difference between Java and JavaScript? A Theyre two different animals. Although their names sound the same, the languages themselves are quite dissimilar. JavaScript is more like VBScript than Java, and Java is more like C++ than JavaScript. Q What kind of World Wide Web limitations sparked the creation of the Java language? A HTML is essentially static. The pages that made up the bulk of the World Wide Web are still images and text. Java was seen as a way to easily add dynamic content to the Web. Q How do I create a Java applet with Visual J++? A The first thing youll need to do is make sure that the New Projects dialog box is opened. This should automatically happen when you first run Visual J++ (unless you have your options set to load the previous solution at startup). If Visual J++ is already running, you can simply select File, New Project. Q How can I change the text that appears by default in applets? A Just open the HTML source code. Find the parameter with the name of label (name=label) and a value of This string was passed from the HTML host. (value=This string was passed from the HTML host.). Edit the value string so that it contains the text youd like displayed. Q Do I need to recompile when I change the HTML code? A No. The HTML code is interpreted. That means the latest HTML code is read in and used. Applet code, on the other hand, is different. Java classes must be compiled. The compilation process converts the .java source code to whats known as byte code. Byte code is what interpreters such as Internet Explorer load in and execute. If you dont compile after a change to your .java source code, the source code is different, but not the byte code. Q Whats the difference between a Java applet and a Java application? A A Java applet is byte code thats interpreted by something such as Internet Explorer. Applets are usually embedded in HTML pages and executed when browsers hit the pages. Java applications are collections of byte code that are wrapped in an .EXE file. The .EXE file runs a special program that causes the byte code to be interpreted by the Java Virtual Machine. Java applications cant be deployed in Web pages. Q I dont know anything about programming. Can I expect to learn how to program with Visual J++ by reading this book? A The first thing you might consider doing is getting a copy of Teach Yourself Java 1.2 in 21 Days (also published by Macmillan). This book systematically teaches all the concepts and techniques you need to know to program with Visual J++. If you conscientiously work your way through the book without skipping anything, youll have a good basis for your Visual J++ programming. You will, however, be much better off if at the end of each chapter you spend some time experimenting with what you learned in the chapter. Q I know a lot about HTML programming. Will that help me write with Visual J++? A Any programming experience will help because many concepts carry over. Visual J++ is much more difficult than HTML, though, so dont expect it to be a cakewalk. Once again, if youre patient and work through this book systematically, youll have very little trouble learning how to program with Visual J++. Review Exercises
|
Products | Contact Us | About Us | Privacy | Ad Info | Home
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc. All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement. |