Computer Science (CSCI) Department
College of Engineering, Computer Science, & Technology (ECST)

JETT Workshops
Java Basics

Fall 2004


Types
(Example code and figures from Computing Concepts with Java Essentials, 3rd edition, by Cay Horstmann.
Visit www.wiley.com/college/horstmann for information on the current edition of this excellent text.)

Exercise - set up, debug, and modify project Bank in Visual Studio .NET

  • start VS .NET
  • create another new project
    • choose File>>Add Project>>New Project
    • click on Visual J# Projects
    • scroll down and click on Empty Project
    • give the project the name Bank
    • click OK
  • bring in an existing file
  • compile the Bank project
    • click on the Bank project
    • choose Build>>Build Bank
  • execute the Bank project
    • right click on the Bank project
    • choose Set As StartUp Project
    • choose Debug>>Start without Debugging
  • use the debugger
    • right click on project Bank
    • choose Debug>>Step into new instance
    • on the menu bar at the top, choose Debug>>Windows>>Locals
    • to execute one statement at a time, choose Debug>>Step into
  • modify BankAccountTest.java to create other BankAccount objects
    • call methods on those objects
    • try copying an object reference with assignment
  • play with the primitive data types
    • create some local variables
    • assign a variety of values to them
    • watch them change with the debugger