![]() |
![]() NEW ALLEN BRADLEY 1785 L80E SER F 1785L80E NIB 2008 US $16,775.00
|
![]() NEW ALLEN BRADLEY 1771 HS3A 1771HS3A NIB US $12,975.00
|
![]() Allen Bradley SD3KFLD60S2R FIELD POWER MODULE 60A NIB US $11,627.49
|
![]() NEW ALLEN BRADLEY VME 1785 V80B 1785V80B PLC 5 V80B NIB AB VME US $11,775.00
|
![]() NEW ALLEN BRADLEY 1785 L40E SER F 1785L40E NIB 2008 US $10,775.00
|
![]() ALLEN BRADLEY 1394 SJT22 C RL NIB MODULE US $10,000.00
|
| Powered by phpBay Pro |

Whats wrong with the code?
class nib
{
public static String reverseString(String s)
{
int l=s.length();
String e=" ";
String backward;
if(l>=0)
{
backward="s.charAt(l-1)";
return backward;}
else
return e;
}
}
public static void main(String args[])
{
String backwards = reverseString ("Allen Downey");
System.out.println(backwards);
}
}
This program is supposed to print the string in reverse. But i keep getting errors. class interface or enum expected..
What does that mean?
And I can't use iteration to write this program.. which is why I haven't used for or while n such...
1. Remove the closing brace } after the else statement in the method reverseString() which is giving the compilation error class interface or enum expected. Due to this the main() method is lying outside the class.
2. Your code for reversing the string is also wrong. You can try this:
public class nib
{
public static String reverseString(String s)
{
int l=s.length();
String backward="";
for (int i=l-1; i>=0; i--)
{
backward= backward + s.charAt(i);
}
return backward;
}
public static void main(String args[])
{
String backwards = reverseString ("Allen Downey");
System.out.println(backwards);
}
}
![]() |
![]() 803 B64RH ALLEN BRADLEY US $78,750.00
|
![]() ALLEN BRADLEY 803 N899 739 1 NSPP 803N8997391 US $51,454.45
|
![]() NEW 600HP ALLEN BRADLEY 600 HP 2400V 1200 AMP MOTOR STARTER NEMA 12 VFD AC DRIVE US $39,999.00
|
![]() Allen Bradley Centerline 2000 Amp 600 Volt Main US $31,000.00
|
![]() ALLEN BRADLEY 803 F812 ROTARY CAM LIMIT SWITCH US $29,999.99
|
![]() Allen Bradley 965418 02 96541802 1775 S4B I O Scanner Ser B US $23,182.00
|
![]() ALLEN HEATH ILIVE T112 SURFACE and iDR48 STAGE MIX RACK AUTH DLR US $21,998.00
|
![]() Allen Heath ML5000 32A Mixing Console NEW US $21,549.01
|
![]() Allen Bradley Centerline Motor Control Center 3 Section 2000 Amp US $20,000.00
|
![]() Allen Bradley 96012174 1775 GA 97594801 Rev A Module US $19,296.00
|
![]() ALLEN BRADLEY 5250 LP4 NSFP 5250LP4 US $19,042.85
|
![]() New in Box 20LF705N0ENNXNW0WA Allen Bradley Drive US $19,000.00
|
![]() ALLEN BRADLEY 1785 L40E FNFP 1785L40E US $17,530.60
|
![]() Allen Bradley 803 PL6 803PL6 Rotary Cam Limit Switch Series A NEW US $17,507.00
|
![]() ALLEN BRADLEY 1756 L1M3 FNFP 1756L1M3 US $17,062.55
|
![]() NEW ALLEN BRADLEY 1785 L80E SER F 1785L80E NIB 2008 US $16,775.00
|
![]() ALLEN BRADLEY 1785 V80B NSFP 1785V80B US $16,623.25
|
![]() ALLEN BRADLEY 150 A135NBDD 8B4 NSFP 150A135NBDD8B4 US $16,560.00
|
![]() ALLEN BRADLEY 5250 LP3 NSFP 5250LP3 US $15,858.50
|
![]() NEW SEALED Allen Bradley 1785 L40E F PLC 5 40E EtherNet Controller PKG 2012 US $15,682.06
|
![]() ALLEN BRADLEY 150 A500NBD NSFP 150A500NBD US $15,541.10
|
![]() ALLEN BRADLEY 1394C SJT10 L RL NSFP 1394CSJT10LRL US $15,523.85
|
![]() ALLEN BRADLEY 1394C SJT22 A NSFP 1394CSJT22A US $15,523.85
|
![]() NEW SEALED Allen Bradley 1785 L40E F PLC 5 40E EtherNet IP Controller 2011 US $15,211.08
|
![]() ALLEN BRADLEY 1394C SJT22 A NSPP 1394CSJT22A US $13,798.85
|
![]() ALLEN BRADLEY 1785 L60L E NSPP 1785L60LE US $13,643.60
|
![]() ALLEN BRADLEY 803P5 A 5 CIRCUIT ROTATING CAM SWITCH NEW US $13,499.00
|
![]() ALLEN BRADLEY 1395 B77 D4 P50 X1 NEW US $13,000.00
|
![]() NEW ALLEN BRADLEY 1771 HS3A 1771HS3A NIB US $12,975.00
|
![]() ALLEN BRADLEY 1756 L63 FNFP 1756L63 US $12,463.70
|
![]() NEW ALLEN BRADLEY POWERFLEX 700H 20CD385N0ANNBNN0 300HP US $12,000.00
|
![]() Allen Heath iLive T112 16x12 28 Fader Control Surface NEW US $11,999.01
|
![]() Allen Bradley SD3KFLD60S2R FIELD POWER MODULE 60A NIB US $11,627.49
|
![]() NEW ALLEN BRADLEY VME 1785 V80B 1785V80B PLC 5 V80B NIB AB VME US $11,775.00
|
![]() ALLEN BRADLEY 1756 L55M14 FNFP 1756L55M14 US $11,701.25
|
![]() ALLEN BRADLEY 1756 L63XT FS 1756L63XT US $11,610.00
|
![]() ALLEN BRADLEY 1775 MEA NSFP 1775MEA US $11,500.00
|
![]() Allen Heath GLD 80 with AR 2412 Rack AUTH DLR US $11,198.00
|
![]() New Allen Bradley PowerFlex 700H 700 20CD385N0ANNBNN0 Series B VFD AC 300HP 480V US $11,000.00
|
![]() ALLEN BRADLEY 1775 KA NSFP 1775KA US $10,942.25
|
![]() ALLEN BRADLEY 150 B360NBD NSFP 150B360NBD US $10,850.25
|
![]() ALLEN BRADLEY 803 PL6 NSFP 803PL6 US $10,827.25
|
![]() ALLEN BRADLEY 512 ESB 6P 27R NSFP 512ESB6P27R US $10,788.15
|
![]() NEW ALLEN BRADLEY 1785 L40E SER F 1785L40E NIB 2008 US $10,775.00
|
![]() ALLEN BRADLEY 1756 L64 NSPP 1756L64 US $10,754.80
|
![]() ALLEN BRADLEY 1756 L73 FNFP 1756L73 US $10,478.80
|
![]() ALLEN BRADLEY 1336S B075 AA EN L6 NSFP 1336SB075AAENL6 US $10,440.85
|
![]() ALLEN BRADLEY 1394C SJT05 D NSFP 1394CSJT05D US $10,350.00
|
![]() ALLEN BRADLEY 1785 L40L E NSFP 1785L40LE US $10,350.00
|
![]() ALLEN BRADLEY 1394C SJT22 D NSPP 1394CSJT22D US $10,348.85
|
![]() ALLEN BRADLEY 1394 SJT05 A NSFP 1394SJT05A US $10,348.85
|
![]() ALLEN BRADLEY 501560 NSPP 501560 US $10,137.25
|
![]() NEW Allen Bradley 2711E K14C6 G PanelView 1400e Color CRT 60 DAYS WARRANTY US $10,111.11
|
![]() 150A180NBD NEW ALLEN BRADLEY 150 A180NBD FREE SHIPPING US $10,000.00
|
![]() NEW ALLEN BRADLEY POWERFLEX 700 200HP 20BR248A0QNNAND0 US $10,000.00
|
![]() ALLEN BRADLEY 1785V40L NEW US $10,000.00
|
![]() NEW ALLEN BRADLEY 270A TWO SPEED 520VE FOD STARTER SIZE 5 US $10,000.00
|
![]() ALLEN BRADLEY 150 A500NBD SMART MOTOR CONTROLLER NEW US $10,000.00
|
![]() ALLEN BRADLEY 1394 SJT22 C RL NIB MODULE US $10,000.00
|
![]() Allen Bradley DC Controller 1395 B75 C3 P10 US $10,000.00
|
![]() Allen Bradley Centerline Bulletin 2100 Motor Control w 3 AB SMC Flex US $9,999.99
|
![]() Allen Heath iLive T80 8x8 20 Fader Control Surface NEW US $9,999.01
|
![]() ALLEN HEATH ILIVE T80 SURFACE AUTH DLR US $9,999.00
|
![]() Allen and Heath iDR 48 48x24 Remote DSP Engine Stage Rack US $9,999.00
|
![]() Allen Heath iDR 48 48x24 Remote DSP Engine Stage Rack NEW US $9,989.01
|
![]() NEW ALLEN BRADLEY 1756 L75 SER A 2010 1756L75 NIB US $9,975.00
|
![]() NEW ALLEN BRADLEY 1785 L60L PLC 5 60 1785L60L LOCAL NIB US $9,975.00
|
![]() ALLEN BRADLEY 150 B135NBDB 8B NSFP 150B135NBDB8B US $9,939.45
|
![]() 500LGOA93 NEW ALLEN BRADLEY 500L GOA93 FREE SHIPPING US $9,900.00
|
![]() ALLEN BRADLEY 20BD156A0AYNACC0 NSFP 20BD156A0AYNACC0 US $9,868.15
|
![]() ALLEN BRADLEY 20P41AD330RA0NNN NSFP 20P41AD330RA0NNN US $9,802.60
|
![]() ALLEN BRADLEY 20BE144A3AYNAEC0 150HP 600V POWERFLEX 70 US $9,800.00
|
![]() NEW ALLEN BRADLEY 1785 V40B PLC 5 40V 1785V40B NNB US $9,699.99
|
![]() 150A135NBD NEW ALLEN BRADLEY 150 A135NBD FREE SHIPPING US $9,696.00
|
| Powered by phpBay Pro |


US $16,775.00




















































































