Changes
Jump to navigation
Jump to search
← Older edit
Newer edit →
Java
(view source)
Revision as of 10:39, 2 April 2015
405 bytes added
,
10:39, 2 April 2015
no edit summary
Line 246:
Line 246:
[https://github.com/rafahsolis/javaTutorial/blob/master/Machine.java Machine.java]<br />
[https://github.com/rafahsolis/javaTutorial/blob/master/Machine.java Machine.java]<br />
[https://github.com/rafahsolis/javaTutorial/blob/master/Car.java Car.java]
[https://github.com/rafahsolis/javaTutorial/blob/master/Car.java Car.java]
+
+
== Packages ==
+
Packages allow to have classes with the same name as long as they are in diferent packages. <br />
+
In orther to be able to use the classes from a package it must be imported.<br />
+
Each package classes will be on a package folder.<br />
+
The first line of the .java file for the classes of one package must be: package package_name
+
Example:
+
<source lang="java">
+
import ocean.fish
+
<source>
+
== Eclipse shortcuts ==
== Eclipse shortcuts ==
Rafahsolis
Bureaucrats
,
Administrators
2,306
edits
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
Variants
Views
Read
View source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
Special pages
Printable version