Originally posted by: michaelh20
You can't overide string because it was deliberately designed to not be overwritable. This has something to do with security concerns. You could use a string as a member and then re write lots of methods.. fun fun fun
The way of declaring it is something like Public Class B Extends Class A { /* method here */}
==========================
java.lang
Class String
java.lang.Object
java.lang.String
All Implemented Interfaces:
CharSequence, Comparable, Serializable
--------------------------------------------------------------------------------
public final class String
extends Object
implements Serializable, Comparable, CharSequence
===================================
When it says final you can't extend it.
Java Api