Archive
Developing & Testing a program in Java
Module 3: Developing & Testing a Java Technology program.
Objectives:
1. Identify 4 components of class.
2. Use main method in a test class to run a java program from command line.
3. Compile & execute a java program.
1. Identify 4 components of class:
Going back to what we discussed before about classes, to construct a house you will first need a blueprint. Same thing applies for classes & objects. Similarly once you have a class blueprint, you can have as many objects of that class as u like. These objects are called instances of a class. i.e., a shirt object is an instance of a shirt class.
Lets take a look at our first class:
Class is a blueprint that tells the computer how to make objects. This class blueprint – Shirt, tells the computer how to make Shirt objects.
Structuring classes:
There are 4 major components of class that you will find more often:
-
class declaration – required
-
attribute variable declaration & initialization – optional
-
methods – optional
-
comments – optional
1. Class declaration is required, and this is all that you need to make a class valid. If all you had was this, then the class and its objects would be uninteresting serving no purpose. You will be needing some attributes and operations to jazz up the object.
2. Variables are characterstics of your objects. As we discussed in previous posts, these are characterstics / properties and they are also data holders. They hold the data for the object.
3. In this Shirt class, only one method is defined. Methods are operations. They tell the class what to do. Its what the class can do. This method is printing all its information to the command window.
4. Comments are for developers to understand what the code is doing, they dont influence the execution in anyway.
Class declaration: Read more…
Author
-
Nothing is hard to learn. Just need to make time and have the right passion.
-
Everyone has a worthy skill. If you don't feel it, you haven't recognised it.
-
It's humane to forget what was learnt a while ago:) Only makes it easier to revise when you need to.
-
Practice doing things in your own stiff timelines. It will help a great deal to fit in others.
-
Execution of a plan is more important than the plan itself.
-
Have good spirit, it will put others to rest. Besides it won't help having anything else.
-
Well, Have fun! :)
Categories
- Ant (3)
- Ant Installation & Configuration (1)
- Ant Introduction (1)
- Why Ant? (1)
- Eclipse IDE (8)
- Good considerations (4)
- Groovy / Grails (1)
- Integration Technlogies (2)
- Java (25)
- Core Java (20)
- Sun Microsystems Educational Services Course (20)
- Java Installation & Configuration (1)
- Java Introduction (1)
- Java Terminologies (1)
- Java Videos & Technology Talks (1)
- Why Java? (1)
- Core Java (20)
- Miscellaneous (1)
- MySQL (5)
- Simple Solutions (1)
- EditPlus (1)
- Source Control Management (1)
- Spring Framework (10)
- Tomcat (3)
Statistics
- 249,954 hits
Technical References
- Apache
- Cnet's Builder.com Cnet’s Builder.com website – All tech articles, some Java-centric.
- Codango Insight into JSP
- Developer.com Java articles hosted by Gamelan.com
- DevX Java articles hosted at DevX
- Eclipse Eclipse main site.
- Hibernate
- IBM's Developerworks IBM’s Developerworks; the Java section.
- JarHoo which class in which jar?
- Java About.com Java news and articles from About.com
- Java Almanac The online counterpart of the Java Developer’s Almanac – highly recommended for quick code snippets.
- Java Beat Interview Questions and Tutorials
- Java beginners Java beginners
- Java Blogs Blog aggregator for the most active Java-based blogs throughout the internet.
- Java DB code examples on java
- Java Desktop The desktop Java community hosted at Java.net.
- Java Developers Journal The Java Developers Journal online magazine website.
- Java Ibiblio The comp.lang.java FAQ – questions asked, answered, and categorized from the comp.lang.java newsgroup.
- Java Lectures lectures on java
- Java Links Links to various Java sites.
- Java Newsletters The Java Specialist Newsletter.
- Java Pro News java articles for java professionals
- Java Resources collection of resources on Java
- Java Server Faces
- Java tips and tricks Java Tips and Tricks
- Java tools and ideas A personal collection of tools and ideas.
- Java World One of the originals. Weekly updates of Java articles.
- Java.net The Java community website hosted by Sun Microsystems.
- Java2s Java examples (example source code) Organized by topic.
- Javacoffeebreak Insight into java technology
- Javalobby The heart of the Java developer community.
- JavaPro online magazine The JavaPro online magazine website.
- Javaskyline Dedicated to Java.
- Javaworld Solutions for java developers
- Jdbc-tutorial Tutorials on JDBC
- Jdocs Ajax driven multi-API java documentation repository
- jguru A great source for Q&A style interaction in the community.
- Mindprod Roedy Green’s Java Glossary
- O'Reilly's Java website New articles weekly.
- Open source java best open source java projects site
- Rose India Tutorials on java and related technologies
- Server-side discussion Often considered the resource for all discussion server-side Java specific.
- Simpler J2ee J2EE made simpler
- Spring Source
- Sun
- Sun Tutorials The Official Java tutorial from Sun – very useful for almost any feature set.
- Techonvideo videos on Java and related technologies.
- Web Developer's Journal
Websites
Recent Posts
- Subversion, Apache Server, Subclipse installation & configuration
- Learn To Build Beautiful HTML5 And CSS3 Websites In 1 Month
- Evolution of Open-Source Enterprise Service Bus (ESB)
- Good read for building high traffic website
- Another read on considerations for high traffic websites
- Build Twitter with Groovy Grails in 90 Minutes by Jeff Brown – Youtube
- Canonical Models
- Few of the best inspiring videos on “Power of One”
- SpringSource Tool Suite
- Spring Integration with Eclipse – SpringIDE
- Developing Spring Application in Eclipse IDE
- Things to know about Spring Download, Installation & Configuration
- Spring Download & Installation
- Why Spring Framework?
- Spring Framework Primer
- Exercise 2 – Using overloaded methods in Java
- Eclipse IDE Workbench, Editing, Ant, Help Tips & Tricks
- Spring Framework Introduction
- Spring Framework Terminologies
- Using operators and decision constructs in Java
Recent Comments
Umadhar on Analyze a problem & design… | |
Jayashri on Analyze a problem & design… | |
Amruta Joshi on Analyze a problem & design… | |
Abhijit on Disable EditPlus backup .bak… | |
Serg on Disable EditPlus backup .bak… | |
partha on Analyze a problem & design… | |
Anonymous on Using operators and decision c… | |
Bridge on Disable EditPlus backup .bak… | |
d on Disable EditPlus backup .bak… | |
Akul on Disable EditPlus backup .bak… |
Top Clicks
- None
Rajani Ramsagar
Error: Twitter did not respond. Please wait a few minutes and refresh this page.
Archives
- November 2014 (2)
- October 2014 (4)
- September 2014 (2)
- August 2014 (2)
- July 2014 (4)
- June 2014 (5)
- May 2014 (2)
- April 2014 (3)
- March 2014 (6)
- February 2014 (6)
- January 2014 (6)
- December 2013 (6)
- November 2013 (4)
- October 2013 (5)
- September 2013 (7)
For more..
- Visit DevelopersBook.COM for free tutorials ,articles, interview resources, technical forums.
- Visit CoreServlets.COM for customized J2EE Training Tutorials.
Pick your post
Latest Java Tools Additions
- An error has occurred; the feed is probably down. Try again later.
Latest Java updates
- An error has occurred; the feed is probably down. Try again later.
What’s new in Java tools?
- NSubstitute NSubstitute is an open source .NET mocking framework. NSubstitute is designed for Arrange-Act-Assert (AAA) testing, so you just need to arrange how it should work, then assert it received the calls you expected once you're done. Because you've go ...
- LightBDDLightBDD is an open source Behaviour-Driven Development test framework that provides the ability to write tests that are easy to read, easy to track during execution and summarize the test results in user friendly report, while allowing developer ...
Bit Pipe
- CW Europe December 2019: Deutsche Bank creates innovation divisionGerman investment banking giant Deutsche Bank is opening a division focused on innovation as part of its plan to digitise all business operations. Read more details in this edition of CW Europe. Published by: ComputerWeekly.com
- How Embedded BI makes your data work for youAccess this exclusive Embedded Analytics guide to explore why your peers are increasingly embedding business intelligence tools in their business applications, and how to weigh the pros and cons of implementing this approach for your organization. Published by: TechTarget
Test, Test, JSF
- Setting JSF ProjectStage with JNDIOne nice feature of JSF2 is the ProjectStage setting. It lets the JSF implementation and the application developer optimize and customize behavior based on whether JSF is running in Development, Production, SystemTest, or UnitTest. The usual way to tell JSF about which ProjectStage to use is through a context param in web.xml. javax.faces.PROJECT_STAGE Dev […]
- Multi-JSF is here! Use any JSF in JBoss ASMulti-JSF is a JBoss AS feature that I've wanted to implement for a very, very long time. Basically, it allows you to use any JSF implementation as if it were the impl that ships with JBoss AS. This works with almost any version of MyFaces or Mojarra. You can even install multiple JSF implementations and tell each app which one to use.Until now, if y […]
MyEclipse::
- MyEclipse 2019.12.5 – Now, Just MyEclipseThe post MyEclipse 2019.12.5 – Now, Just MyEclipse appeared first on Genuitec.
- Creating a Django Authentication AppLearn how to use the Django authentication system to manage users and build an app from scratch to authenticate them with a username and password - all using CodeMix. The post Creating a Django Authentication App appeared first on Genuitec.
JSF Resources
- An error has occurred; the feed is probably down. Try again later.
Hibernate | JSF | Spring
- Book Excerpt | Good Relationships: The Spring Data Neo4j Guide BookThe Spring Data Neo4j Project This project is part of the Spring Data project, which brings the convenient programming model of the Spring Framework to modern NOSQL databases. Spring Data Neo4j, as the name alludes to, aims to provide support for the graph database Neo4j. The first part of the book provides a tutorial that walks through the creation of a com […]
- Spring: The Art of Using GRASP PatternsWhen we searched for design pattern articles, we found documentation concerning "Gang of Four" patterns. They are very useful and contribute to a well-designed application. But when I discovered GRASP principles , I advised any one interested to improve his skills design to look at these principles. It gives the fundamental rules of design. In this […]
JSFCentral — News
- An error has occurred; the feed is probably down. Try again later.
Spring Source
- This Week in Spring - Sept 24th 2013Hello everyone! Pieter posting this on Josh Long's behalf here... this week the Spring and Cloud Foundry teams are at JavaOne talking to developers about Spring, Cloud Foundry, Hadoop and big data! Happily, our pretty new @GoPivotal booth has garnered a lot of attention! I met Duke, too! I think the big guy was as happy to see me as I was him! Spring ni […]
- Webinar: Building Big Data Applications with Hadoop & SpringAt Pivotal we are bringing two open source projects together -- Hadoop and the very rapid and widely used Spring java application development framework to help build Big Data Applications. While Hadoop is proving to be the defacto foundation for storing and processing data, real-world scenarios require much more. Millions of developers are already using Spri […]
JSF 2.0 Group
- Early Draft Review 1: RecapJust in case you didn't notice, we released the Early Draft Review Draft (ERD) 1 of the JavaServer Faces 2.0 specification back in June. If you didn't have the time or inclination to read the spec, here are the key features it includes (links point to Ryan Lubke's well-written detailed blog entries): Feature Description Development stages Allo […]
- JSF 2 ScheduleSo, when is JSF 2 supposed to be released? The simple answer is "when Java EE 6 is released." But, for those who want a little more detail, here is the current schedule: MilestoneTarget DateHand Off to JCP DateCompletion Date Spec EDR1 21 Apr 2008 24 Apr 2008 3 Jun 2008 Spec EDR2 31 Aug 2008 Spec Public Review 26 Sept 2008 Spec Proposed Final […]
Hibernate Weblog
- An error has occurred; the feed is probably down. Try again later.
JDJ
- Codete to Exhibit at @CloudEXPO | @CodeteGmbH @KPrzystalski #Cloud #FinTech #AI #Blockchain #MachineLearning #ArtificialIntelliegenceCodete accelerates their clients growth through technological expertise and experience. Codite team works with organizations to meet the challenges that digitalization presents. Their clients include digital start-ups as well as established enterprises in the IT industry. To stay competitive in a highly innovative IT industry, strong R&D departments and […]
- Are You Ready for GDPR? | @CloudEXPO @CalligoCloud #HybridCloud #CIO #GDPR #Serverless #DataCenter #Compliance In his general session at 21st Cloud Expo, Greg Dumas, Calligo’s Vice President and G.M. of US operations, discussed the new Global Data Protection Regulation and how Calligo can help business stay compliant in digitally globalized world. Greg Dumas is Calligo's Vice President and G.M. of US operations. Calligo is an established service provider that pr […]
Eclipse IDE Editing Source Trips & Tricks
Eclipse IDE Productivity Tips & Tricks – Editing Source:
Okay, we might know about few or most of these from everywhere, also might already have this list handy as this comes straight out of Eclipse help tutorial. But I am posting here so that this can be available anytime on the move. The following tips and tricks give some helpful ideas for increasing productivity while working on Eclipse IDE. These tips & tricks can be grouped into 7 main categories namely:
This post has Editing Source Tips & Tricks. Refer to posts in Eclipse Tips & Tricks for others. Read more…