Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > Java Basics
|
Java Basics General beginning Java language questions that don't fit in one of the more specific forums. Please specify what version.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 7th, 2008, 02:26 AM
Authorized User
 
Join Date: Oct 2007
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to hafizmuhammadmushtaq Send a message via Yahoo to hafizmuhammadmushtaq
Default how to extend the String class

hi........i want to extend the String class........how can i do this?........plz come up with some solutions

 
Old April 7th, 2008, 03:46 AM
jomet
Guest
 
Posts: n/a
Default

A final class may not be extended, neither may a final method be overridden.
java.lang.String
is a final class
public final class String

what is your requirement???

jomet.
---------------------------------------------
Once you start a working on something,
dont be afraid of failure and dont abandon it.
People who work sincerely are the happiest.
 
Old April 7th, 2008, 06:21 AM
Authorized User
 
Join Date: Oct 2007
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to hafizmuhammadmushtaq Send a message via Yahoo to hafizmuhammadmushtaq
Default

well, i want to create a class MyString and extend it from the String class. In the main method,i want to create a new object of the class i.e., MyString and call any three non-static methods of String class using object of MyString class.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Get Class from String? Raconteur ASP.NET 2.0 Professional 0 May 3rd, 2007 05:13 PM
Invalid class string CH 6 itpro2 BOOK: Beginning ASP 3.0 0 May 22nd, 2006 05:15 PM
Invalid class string - : 0x800401F3 not24 C# 2005 1 March 16th, 2006 04:53 PM
Adding functionality to the String class? RobMeade BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 5 February 9th, 2005 02:11 PM
String class dotnetprogrammer VS.NET 2002/2003 0 November 20th, 2004 01:30 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.