🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.java
Article #831

Re: Interfejs Implementacja

#831
From: pki
Date: Wed, 06 Aug 1997 02:17
42 lines
1494 bytes
On Wed, 06 Aug 1997 01:06:59 +0200, Artur Tyloch
<arturt@friko.onet.pl> wrote:

>Mam klopot z implementacja interfejsu.
>Wezmy prosty przyklad:
>mamy interfejs:
>
>interface PointInterface 
>{
> void move(int dx, int dy);
>}
>
>i klase implementujaca interfejs:
>
>class Punkt implements PointInterface
>{
> int x,y;
> void move(int dx,int dy)
> {
>  x=x+dx;
>  y=y+dy;
> }
>przy kompilacji w J++  mam blad:
> error J0062: Attempt to reduce access level of member 
>'void PointInterface.move(int dx, int dy)'
>
>Co powoduje ten blad?
>Co jest nie tak?
>
>Artur

Czesc,

Istotnie tym razem M$ nic nie naklamal.

Metody w interface maja zakres dostepnosci okreslony jako publiczny.
W zwiazku z tym podczas implementacji metody w klasie Punkt rowniez
musisz okreslic zakres dostepnosci jako publiczny i wszystko bedzie OK

Pozdrawiam

Piotrek
Technical Details
Message-ID: <33ebde27.30041267@news.icm.edu.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!agh.edu.pl!news.wnaft.agh.edu.pl!polsl.gliwice.pl!ict.pwr.wroc.pl!news.icm.edu.pl!not-for-mail
References: <33E7B213.2CD0@friko.onet.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!agh.edu.pl!news.wnaft.agh.edu.pl!polsl.gliwice.pl!ict.pwr.wroc.pl!news.icm.edu.pl!not-for-mail
From: pki@rubikon.net.pl
Newsgroups: pl.comp.lang.java
Subject: Re: Interfejs Implementacja
Date: Wed, 06 Aug 1997 02:17:06 GMT
Organization: ICM
Lines: 42
Message-ID: <33ebde27.30041267@news.icm.edu.pl>
References: <33E7B213.2CD0@friko.onet.pl>
Reply-To: jman@rubikon.net.pl
NNTP-Posting-Host: ppp2-cst59.warszawa.tpnet.pl
Mime-Version: 1.0
X-Newsreader: Forte Agent 1.0/32.390
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit