









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
In the course of the Introduction to Jave Programming, we study the basic syntax and the basic program in java. In these lecture slides the key points are: Java Etiquette, Survey Results, Less Side Tracking, Toolbox, String, Double, Operations, Java Naming, Class Size, Variable
Typology: Slides
1 / 17
This page cannot be seen from the preview
Don't miss anything!
Less side tracking (questions that are not on topic) See website for all info! You may need to practice code outside class!
(See:MySwap.java)
Conventions for identifiers: Class - Start with uppercase (e.g. StringBuffer) Object - Start with lowercase (noun) (e.g. homeworkOneGrade) Method - Start with lowercase (verb) (e.g. isEmpty() )
Java constants should be in all caps and an underscore (_) go between words Example: public static final int ROOM_CAPACITY = 246; Should declare these above main method (see JavaConstants.java)
Types of comments: // ... - One line of comment (Ctrl + /) /* ... / - Everything between is commented (even multiple lines) /* ... */ - javadoc commentation
Indent more when branching (braces) (NetBeans and many others do this automatically) Also indent when a single command takes up more than one line of code
known elephant in Cairo to ensure that the algorithm will terminate.
hands and knees. How to catch an Elephant in the Africa
If you find yourself going through the code and replacing numbers/variables/methods, then you should make a constant (or method) If you don't think carefully about variable names, you will have to go back and rename it (or have code with illogical names)