Omnimaga

General Discussion => Technology and Development => Computer Programming => Topic started by: helpMEimDYING on January 22, 2013, 09:58:22 pm

Title: i need help
Post 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
Title: Re: i need help
Post by: epic7 on January 22, 2013, 10:16:00 pm
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)
Title: Re: i need help
Post by: ruler501 on January 22, 2013, 11:34:39 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 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.
Title: Re: i need help
Post by: fb39ca4 on January 22, 2013, 11:48:19 pm
Extend means the child inherits everything from the parent.
Title: Re: Re: i need help
Post by: Scipi on January 23, 2013, 02:54:01 am
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.
Title: Re: i need help
Post by: SpiroH on January 23, 2013, 05:10:38 am
Can this http://docs.oracle.com/javase/tutorial/java/concepts/interface.html be of any help?
Title: Re: i need help
Post by: ghest1138 on January 23, 2013, 11:20:26 am
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.
Title: Re: i need help
Post by: cooliojazz on January 23, 2013, 04:53:49 pm
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.
Title: Re: i need help
Post by: ghest1138 on January 23, 2013, 04:58:27 pm
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.