Re: extending class that is not in a packed

From: Niki Iv (niki_iv_at_abv.bg)
Date: 10/04/04


Date: Mon, 04 Oct 2004 06:55:26 GMT

How can I 'import' classes in java
This concept is new to me. Now I am using reflect to extend this class
but this obviously is not the best solution?

On Wed, 29 Sep 2004 21:00:24 -0400, "Hal Rosser"
<hmrosser@bellsouth.net> wrote:

>Import the class you want to extend
>
>"Niki Iv" <niki_iv@abv.bg> wrote in message
>news:jmpil05e733sk1fiemt4oq8p61c2t5q14b@4ax.com...
>> Hello all,
>> I have this problem.
>> I have a class that is not in a package
>> lets say
>>
>>
>> public class Class1 {
>> public Class1() {
>> ....
>> }
>> public void DoSomething(){
>> ....
>> }
>>
>> }
>>
>>
>> and class Class2 that is
>> package a;
>> class Class2{
>> public Class2() {
>> ....
>> }
>> public void DoSomething2(){
>> ....
>> }
>>
>> }
>>
>> My question is
>> How can Class2 extend Class1 since Class1 is not part of a package?
>> Regards
>> Niki
>
>
>---
>Outgoing mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.770 / Virus Database: 517 - Release Date: 9/27/2004
>



Relevant Pages

  • Re: extending class that is not in a packed
    ... > I have a class that is not in a package ... > public void DoSomething(){ ... > and class Class2 that is ... > public void DoSomething2(){ ...
    (comp.lang.java)
  • Re: C# Reflection--anybody use it lately?
    ... public void DoSomething() ... public void DoSomethingElse() ... This AOP approach only uses reflection during compile time and not runtime, additionally I will say that if you think AOP is only related to security then either that URL is no good or you misunderstood it. ... Tut tut. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: finalize()
    ... public void doSomething() throws Exception { ... File file = null; ... You failed to catch the Exception that doSomethingmight throw. ...
    (comp.lang.java.programmer)
  • Re: finalize()
    ... abstract class DoSomething { ... public void doSomething() throws Exception { ...
    (comp.lang.java.programmer)
  • Re: runtime stack
    ... The stack would be relevant if you were concerned about the number of variables you are using within a method. ... public void FirstTry(string varone){if ... dosomething();} ...
    (microsoft.public.dotnet.languages.csharp)