printlogo
http://www.ethz.ch/index_EN
Welcome
 
print
  

Code examples (Java Primer I)

This module contains the code examples introduced in the Java Primer I lecture. We recommend that you download and install it to modify and explore the code.

  1. Download and extract the content of the primer1.zip file into your project directory (compmodels).
  2. Within IntelliJ IDEA, go to File->Settings->Paths and click on the button to add a module. Select to import an existing module and specify primer1/primer1.iml.
  3. Since the module only contains four classes to be run separately, we do not create a runtime configuration for each class. Instead, expand the project structure as shown in the screenshot below and right-click on the class you want to run. For example, to print out the Fibonacci series, select "Run Fibonacci.main()" in the pop-up menu.
primer1
 

Wichtiger Hinweis:
Diese Website wird in älteren Versionen von Netscape ohne graphische Elemente dargestellt. Die Funktionalität der Website ist aber trotzdem gewährleistet. Wenn Sie diese Website regelmässig benutzen, empfehlen wir Ihnen, auf Ihrem Computer einen aktuellen Browser zu installieren. Weitere Informationen finden Sie auf
folgender Seite.

Important Note:
The content in this site is accessible to any browser or Internet device, however, some graphics will display correctly only in the newer versions of Netscape. To get the most out of our site we suggest you upgrade to a newer browser.
More information

© 2012 ETH Zurich | Imprint | Disclaimer | 17 May 2005
top