🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: aus.computers.java
Article #1152

Re: Help!!! What is wrong with my code?

#1152
From: Jason Zaugg
Date: Sat, 05 Jun 1999 00:00
14 lines
921 bytes
<snip>
>if you know whats wrong. pleassssee email me at
>Qin@mingspring.com  thanks in advance.

<snip>

>  g.drawString(myHour + myMinute);

g.drawString(myHour + ":"  myMinute);

will stop Java from adding the two ints. The '+' operator is overloaded --
that is it has different meanings depending on context. Usually it adds
numbers, but for convenience, it also concatenates Strings (which would look
real ugly otherwise")
Technical Details
Message-ID: <7jak2r$mp3$1@bunyip.cc.uq.edu.au>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7ja1n9$a0f$1@nntp6.atl.mindspring.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d6db,7e24c88ff49a53a8
X-Google-Attributes: gid10d6db,public
From: "Jason Zaugg" <zaugg@email.com>
Subject: Re: Help!!! What is wrong with my code?
Date: 1999/06/05
Message-ID: <7jak2r$mp3$1@bunyip.cc.uq.edu.au>
X-Deja-AN: 485954942
References: <7ja1n9$a0f$1@nntp6.atl.mindspring.net>
Organization: University of Queensland
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Newsgroups: aus.computers.java