🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: be.comp.programming
Article #1257

Re: [java] bij exit een functie aanroepen

#1257
From: Djatha
Date: Tue, 07 Jun 2005 15:04
15 lines
1505 bytes
John Bokma wrote:
...
>> Is het mogelijk dat als het programma wordt afgesloten dat er dan nog
>> een functie wordt aangeroepen?
> 
> Als het programma uit zichzelf afloopt, natuurlijk. Maar ik gok dat je
> bedoelt als iemand Ctrl+C indrukt?

Misschien dat U een try-finally blok in de main-methode kunt stoppen. In
principe wordt het finally-blok altijd uitgevoerd, ook bij onverwacht
eindigen. Of het werkt, weet ik niet, maar het is eenvoudig uit te
proberen.

-- 
Djatha
Technical Details
Message-ID: <d84d3b$t49$1@news.tue.nl>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeeder.wxs.nl!surfnet.nl!news.tue.nl!not-for-mail
References: <C_dpe.113020$To5.6681650@phobos.telenet-ops.be> <Xns966E65B9DD9B9castleamber@130.133.1.4>

Show Full Headers
Complete Article Headers
X-Google-Thread: fcea4,75f5435a4efa2997
X-Google-Attributes: gidfcea4,public
X-Google-Language: DUTCH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeeder.wxs.nl!surfnet.nl!news.tue.nl!not-for-mail
From: Djatha <Djatha@[maakt_geen_misbruik]hotmail.com>
Newsgroups: be.comp.programming
Subject: Re: [java] bij exit een functie aanroepen
Date: Tue, 07 Jun 2005 17:04:53 +0200
Organization: Eindhoven University of Technology, The Netherlands
Lines: 15
Message-ID: <d84d3b$t49$1@news.tue.nl>
References: <C_dpe.113020$To5.6681650@phobos.telenet-ops.be> <Xns966E65B9DD9B9castleamber@130.133.1.4>
Reply-To: Djatha@[maakt_geen_misbruik]hotmail.com
NNTP-Posting-Host: t-26-53.athome.tue.nl
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
X-Trace: news.tue.nl 1118156715 29833 131.155.224.53 (7 Jun 2005 15:05:15 GMT)
X-Complaints-To: abuse@tue.nl
NNTP-Posting-Date: Tue, 7 Jun 2005 15:05:15 +0000 (UTC)
User-Agent: KNode/0.9.0