There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
audio avg avg 8 blue screen brand new codec control panel conversion crash delete personal data desktop display dos driver duplicate dvd error error message excel explorer file firefox game graphics hardware hijackthis log install installation internet itunes javascript laptop macro malware monitor msconfig msn music network outlook outlook 2003 outlook express php problem program random rundll32 security seo sound sp3 spyware switch tag cloud trojan usb video virtumonde virus vista visual basic vundo wallpaper windows windows vista windows xp wireless word xp sp3 youtube
Software Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Software Development >
Can anyone Help me answers these for Java!!


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

 
Thread Tools
bootsiebella's Avatar
Junior Member with 12 posts.
 
Join Date: Mar 2008
09-May-2008, 10:01 PM #1
Smile Can anyone Help me answers these for Java!!
Out of 100 question there was only 3 I can not answer. I would love if some could please help me out!!
Thanks

These are the only answers I could not find can anyone help me out please
--------------------------------------------------------------------------------------------------------------------------------
public class TestA {
public static void main( String args[] )
{
int x = 2, y = 20, counter = 0;

for ( int j = y % x; j < 100; j += ( y / x ) ) {
counter++;
}
}
}

public class TestB {
public static void main(String args[])
{
int counter = 0;

for ( int j = 10; j > 0; --j ) {
++counter;
}
}
}

Which of the following statements is true ( circle all that apply, or none )?
a. The value of counter will be the different at the end of each for loop for each class.
b. The value of j will be the same for each loop for all iterations
c. Both (a) and (b) are true.
d. Neither (a) nor (b) is true.

-------------------------------------------------------------------------------------------------------------------------------
. Consider the code segment below.

if ( gender == 1 )
if ( age >= 65 )
++seniorFemales;

This segment is equivalent to which of the following ( circle all that apply, or none )?
a. if ( gender == 1 || age >= 65 )
++seniorFemales;
b. if ( gender == 1 && age >= 65 )
++seniorFemales;
c. if ( gender == 1 AND age >= 65 )
++seniorFemales;
d. if ( gender == 1 OR age >= 65 )
++seniorFemales;

----------------------------------------------------------------------------------------------------

Consider the following Java statements:

nt x = 9;
double y = 5.3;
result = calculateValue( x, y );

Which of the following statements is true ( circle all that apply, or none )?
A. The method call operator is ().
B. x and y are parameters.
C. Copies of x and y are passed to the method calculateValue().
D. x and y are arguments.

a. None of the statements are true.
b. B and D are true.
c. B is false.
d. All of the statements are true.
Chicon's Avatar
Computer Specs
Distinguished Member with 6,213 posts.
 
Join Date: Jul 2004
Location: 50° 34' 07.13" N - 04° 10' 23.58" E
Experience: Intermediate
10-May-2008, 03:02 AM #2
Question 1 : at the end of each loop, counter will have the same value and j will be different,
therefore d

Question 2 : b

Question 3 : d
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 Off
Refbacks are Off

You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 12:18 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.