Omnimaga
General Discussion => Technology and Development => Computer Programming => Topic started by: helpMEimDYING on January 22, 2013, 09:58:22 pm
-
hello, im having some trouble with java terminology and it would be greatly appriciated if someone could help me define any of the terms they know
extends
interface
excapsulation
package
fields
thank you
-
I'm not that great with terminology myself, but there's a glossary of java terms here http://www.cs.kent.ac.uk/people/staff/djb/oop/glossary.html#f (http://www.cs.kent.ac.uk/people/staff/djb/oop/glossary.html#f)
-
hello, im having some trouble with java terminology and it would be greatly appriciated if someone could help me define any of the terms they know
extends
interface
excapsulation
package
fields
thank you
I haven't used java in forever so I might be wrong on some of these, but this is what I think I remember.
extends is how java does inheritance. When you say one class extends another you say that it inherits from it. I can't remember what exactly it takes from the parent class though.
I believe an interface is one level below a class. It is a basic setup for a class that tells you what must be in any class that implements(or maybe extends I don't remember which term it is) it. It is used to be able to assure that multiple classes will have the members and methods you need for a task.
excapulation I don't even remember having heard before sorry.
A package is usually something that you can include/import into your program to get all of the classes and methods defined in it.
fields can have lots of meanings so I'm not sure what its asking for here.
-
Extend means the child inherits everything from the parent.
-
Interface is similar to a class in that methods in a class that "implements" an interface have the same methods as it. Interfaces can only have virtual members and are useful for having multiple classes that use similar methods.
-
Can this http://docs.oracle.com/javase/tutorial/java/concepts/interface.html be of any help?
-
If you do a google search for "java tutorials", the one on the oracle website(the official tut) is really great! It's where i learned most of my programming skillage.
-
Packages are literally folders, accessed with a dot instead of a slash. You need to import them to get any code files stored inside those folders, and certain parts of the access permissions are defined by things being in similar or dissimilar packages.
Fields typically refers to everything defined inside of a class, for example any class variables.
-
An interface is a type that defines the methods that you want certain classes to use. It is useful, for example, to make it easier to define new classes that will be interacting in the same way as other existing classes that implement that interface.