Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

difference between strings, classes, and objects

  Asked By: Ryan    Date: Sep 27    Category: Java    Views: 1087

could someone explain the difference between strings, classes, and
objects? im getting confused and am new to programming.

thanks to anyone who replies

ps im struggling to understand uml diagrams, all i see is that the
top part is the class, followed by attributes, and then methods.
this doesnt help me at all.



4 Answers Found

Answer #1    Answered By: Angelica Ramos     Answered On: Sep 27

Everything in java is an OBJECT
String is an object so are the classes
String is a class  but also, you use strings  to declare data types
eg: String name="Baglan"
You make this decleration inside a class
Public MyClass {
String name="Baglan"
Classes have attributes  (properties) and they have methods  which determine the
behavior of that class
Good luck
If you need further explanation you can refer to

Answer #2    Answered By: Lonnie Rogers     Answered On: Sep 27

The class  should defined like this
public class MyClass {
String name="Baglan"

Answer #3    Answered By: Hubba Akhtar     Answered On: Sep 27

Check this URL for more info about UML


Answer #4    Answered By: Sumitra 2004     Answered On: Sep 27

String is a data type of class
Class is an group of entities which can be unifed on some basis.
Object is an instance of class
for example car is class, object is fiat, "car" is an instance

Didn't find what you were looking for? Find more on difference between strings, classes, and objects Or get search suggestion and latest updates.