Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > What does this mean??

Reply
Thread Tools

What does this mean??

 
 
freesoft_2000
Guest
Posts: n/a
 
      11-01-2005
Hi everyone,

I have two rather silly questions so please bear with me

what does the below code
mean

Rectangle alloc = (a instanceof Rectangle) ? (Rectangle) a :
a.getBounds();

Could someone translate the above code into simple java codings so i can
understand it

And finally what does the below code mean

x*= 0.5

Could someone also translate the above code into simple java codings so i
can understand it

I know these quenstions may sound stupid but please bear with me

Thank You

Yours Sincerely

Richard West

 
Reply With Quote
 
 
 
 
VisionSet
Guest
Posts: n/a
 
      11-01-2005

"freesoft_2000" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) lkaboutprogramming.com...
>
> Rectangle alloc = (a instanceof Rectangle) ? (Rectangle) a :
> a.getBounds();
>
> Could someone translate the above code into simple java codings so i can
> understand it


Rectangle alloc ;
if (a instanceof Rectangle) alloc = (Rectangle) a;
else alloc = a.getBounds();

>
> And finally what does the below code mean
>
> x*= 0.5
>


x = x * 0.5;

--
Mike W


 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      11-01-2005
freesoft_2000 wrote:

> I know these quenstions may sound stupid ..


Only because they are. But at least that is a start.
Once you can accurately identify stupid questions,
it will(/should) help you not ask them.

> ..but please bear with me


What motivation is there to give you the patience
normally reserved for Java noobs, when you fail to
post questions to the group* best suited for those
new to Java/usenet/formulating intelligent questions?

* You should know the group. I have mentioned it to
you on earlier occasions.
 
Reply With Quote
 
Ted Present
Guest
Posts: n/a
 
      11-01-2005
> * You should know the group. I have mentioned it to
> you on earlier occasions.


As another java "noob," could you tell me what group that might be?

~~Ted Present


 
Reply With Quote
 
SteveB
Guest
Posts: n/a
 
      11-01-2005
"Ted Present" <(E-Mail Removed)> wrote in message
news:VYP9f.77$Ul3.73@trndny07...
> > * You should know the group. I have mentioned it to
> > you on earlier occasions.

>
> As another java "noob," could you tell me what group that might be?
>


comp.lang.java.help


 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      11-01-2005
Ted Present wrote:

>>* You should know the group. I have mentioned it to
>>you on earlier occasions.

>
> As another java "noob," could you tell me what group that might be?


<http://www.physci.org/codes/javafaq.jsp#cljh>

There is a description of the major Java usenet groups in
the PhySci Java FAQ..
<http://www.physci.org/codes/javafaq.jsp#groups>

HTH
 
Reply With Quote
 
Ted Present
Guest
Posts: n/a
 
      11-01-2005
Thanks I'll take a look. I've a bit of java experience, but being
self-taught, there are a few simple things that I often get caught up over.
This group has helped befire, but much of it was way above me.

~~Ted Present

>> > * You should know the group. I have mentioned it to
>> > you on earlier occasions.

>>
>> As another java "noob," could you tell me what group that might be?
>>

>
> comp.lang.java.help
>
>



 
Reply With Quote
 
SteveB
Guest
Posts: n/a
 
      11-01-2005
"Ted Present" <(E-Mail Removed)> wrote in message
news:4lQ9f.177$9E4.9@trndny02...
> Thanks I'll take a look. I've a bit of java experience, but being
> self-taught, there are a few simple things that I often get caught up

over.
> This group has helped befire, but much of it was way above me.
>

I'm in the same boat.


 
Reply With Quote
 
Rhino
Guest
Posts: n/a
 
      11-01-2005

"Andrew Thompson" <(E-Mail Removed)> wrote in message
news:tIO9f.6307$(E-Mail Removed)...
> freesoft_2000 wrote:
>
> > I know these quenstions may sound stupid ..

>
> Only because they are. But at least that is a start.
> Once you can accurately identify stupid questions,
> it will(/should) help you not ask them.
>

There is nothing "stupid" about his questions. They simply demonstrate his
inexperience with Java. There's nothing stupid about being new to Java; we
were all beginners once.

> > ..but please bear with me

>
> What motivation is there to give you the patience
> normally reserved for Java noobs, when you fail to
> post questions to the group* best suited for those
> new to Java/usenet/formulating intelligent questions?
>
> * You should know the group. I have mentioned it to
> you on earlier occasions.


You appear to have more justification for these remarks. However, I don't
think of comp.lang.java.help as being reserved for "noobs" or those who are
new to Java, Usenet or formulating intelligent questions. I don't consider
myself to fit into any of those categories but I post questions at
comp.lang.java.help occasionally when I want to discuss concepts or design
issues when I have gaps in my OO background, for instance. The atmosphere
seems a bit more patient and tolerant there while comp.lang.java.programmer
sometimes seems frenzied and rude by comparison.

_You_ may want to relegate beginners to that newsgroup but I think it is a
bit presumptious of you to pretend to speak for the entire Java community or
to be the final authority on what belongs in each newsgroup. At any rate,
the fact that a number of people besides myself seem to feel the same way
suggests you do not speak for _us_.

Mind you, I'm not saying there's anything wrong with a newsgroup
specifically for beginners. It just doesn't seem to me that there is a
concensus that comp.lang.java.help is it. It seems to be used for things
other than what you have in mind.

Rhino


 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      11-01-2005
On Tue, 01 Nov 2005 13:28:59 -0500, "freesoft_2000"
<(E-Mail Removed)> wrote, quoted or indirectly quoted someone
who said :

>Rectangle alloc = (a instanceof Rectangle) ? (Rectangle) a :
>a.getBounds();


I gather the ternary operator is what has you flummoxed.
See http://mindprod.com/jgloss/precedence.html#TERNARY

--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
.NET 2.0 ASPx Page does not load, but HTM does prabhupr@hotmail.com ASP .Net 1 02-08-2006 12:57 PM
Button OnClick does not fire on first postback, but does on second Janet Collins ASP .Net 0 01-13-2006 10:08 PM
Does the 2.0 Framework come out when Visual Studio .NET 2005 does? needin4mation@gmail.com ASP .Net 3 10-07-2005 12:55 AM
CS0234 Global does not exist ... but it genuinely does Bill Johnson ASP .Net 0 07-08-2005 06:34 PM
Does no one else think microsoft does a poor job? =?Utf-8?B?SmVyZW15IEx1bmRncmVu?= Wireless Networking 2 11-20-2004 12:17 AM



Advertisments