Changes

Jump to: navigation, search

Team2/Navigate to a Java Element's Declaration

956 bytes added, 23:57, 2 February 2011
no edit summary
kjkj=Guide Line=*First create a class within the "secondAPP" package called "LabExercise2" and copy and paste the following code<pre>package secondApp; public class LabExercise2 { public static void main(String[] args) { LabExercise1 sample; sample = new LabExercise1(); if (sample.c==4) { sample.printHello(); } else { System.out.println("Whatever"); }  }}</pre> *Within "LabExercise2" editor window, place your cursor on "sample = new LabExercise1();" and right click it. From there, scroll down and click "Declaration" *You should now see "LabExercise1" opened in the editor window with the method "LabExercise1()" highlighted. This essentially means the highlighted method is the declaration used in the other java class. *[http://zenit.senecac.on.ca/wiki/index.php/Team2/Viewing_the_Type_Hierarchy Click here] to progress to the next tutorial
1
edit

Navigation menu