Defining a new class similar to String

  • Thread starter Bernhard Enders
  • Start date
B

Bernhard Enders

I'm quite new to Java and the OOP world, so may be it's a nonsense
question, but here it is: I want to code a very simple class that has a
few methods for manipulating a unique property of type String. In other
words, and without the OOP jargon, I just want a variable of type
String and some functions to work with it, but I don't want to use the
dot operator to simply get the contents of the string. This is similar
to the standard String class, where you have the privates value, count,
offset, etc.. properties and you don't need to say (for String str)
str.value = "abc"; How can I do that? Thanks in advance,

Bernhard Enders.
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

Bernhard said:
I'm quite new to Java and the OOP world, so may be it's a nonsense
question, but here it is: I want to code a very simple class that has a
few methods for manipulating a unique property of type String. In other
words, and without the OOP jargon, I just want a variable of type
String and some functions to work with it, but I don't want to use the
dot operator to simply get the contents of the string. This is similar
to the standard String class, where you have the privates value, count,
offset, etc.. properties and you don't need to say (for String str)
str.value = "abc"; How can I do that?

I dont think you can.

C++ ! :)

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top