Java Syntax, Java Conventions, CSE 115 Conventions (Part 1)I - Java FilesI – Java FilesII – Java SyntaxIII – Names of Java FilesIV – Identifying the classV – Class vs. ObjectVI – Where does the program start?Java Syntax, Java Conventions, CSE 115 Conventions (Part 1)CSE 115 Spring 2006January 25 & 27, 2006I - Java FilesAll files that contain Java source code have a .java extensionCode that has been compiled (using the compiler javac) will be turned into byte code and stored in files with a .class extensionRun the files with the java command to execute the program.I – Java FilesThe process of creating files is often called the edit-compile-run cycle as the steps are:Create/edit your source codeCompile the codeRun the program to see if it worksIf it doesn’t work correctly, go back to step 1II – Java SyntaxJava is case sensitive (as is UNIX)The words:excellentExcellentare seen as different by JavaJava is also an extremely consistent speller.III – Names of Java FilesMatch the names of the classes defined in those filesEach file contains one (and only one) class definitionAll Java code must exist inside of a classIV – Identifying the classClass definitions begin at the word public and end at a } that matches a { that follows the name of the class.public class SomeName {Between the { } is the Java code that outlines what the functionality of the class is.}V – Class vs. ObjectClass – formal specification (definition)Object – actual instanceWe need to represent properties and capabilities formally, what programming constructs do we use to do this?VI – Where does the program start?Q: How do you get your program to run in Eclipse?Q: What are the two types of Java programs and what are their differences?Program starts with the first line of the Applet’s
View Full Document