Go Back   Computer Forums > General Computing > Programming
Join Computer forums Today

Thread Tools Search this Thread Display Modes
Old 12-31-2001, 07:43 PM   #1
(╯□)╯︵ ┻━┻
Teny's Avatar
Join Date: Dec 2006
Location: United States
Posts: 5,957
Default whats the output?

so heres the code fragment.

String einsteinQuote =
"Peace Cannot be kept by force; it can" +
" only be archived by understanding.";
System.out.print (
einsteinQuote.indexOf ("can") + "" +
einsteinQuote.indexOf ("can", 7) + "" +
einsteinQuote.lastIndexOf ("can"));
I need to find the output of this. I'm thinking its "only be" since it starts from "can", and ends after 7 spaces over where its on "b(e)".
making sure if i am getting the right output or not.
Desktop -Cooler Master NV690/AMD Phenom II X4 965 BE/MSI 880G-E45 Motherboard/2 x 2GB DDR3 G.Skill Ripjaws X/Sapphire HD 5870 1GB GDDR5/CORSAIR CMPSU-550VX/Seagate 7200.12 500GB (OS), Samsung F3 1TB (Storage)/Sony DVD Burner/Windows 7 Professional 64-bit
Teny is offline   Reply With Quote

« - | mIRC Crack »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

All times are GMT -5. The time now is 08:48 AM.

Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2016, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0