Overclock.net - Overclocking.net
     
 
Home Gallery Reviews Blogs Register Today's Posts Mark Forums Read Members List


Go Back   Overclock.net - Overclocking.net > Software, Programming and Coding > Coding and Programming

Reply
 
LinkBack Thread Tools
Old 03-23-07   #1 (permalink)
nVidia Enthusiast
 
ModeX's Avatar
 
intel nvidia

Join Date: Oct 2006
Posts: 348

Rep: 6 ModeX Unknown
Unique Rep: 6
Trader Rating: 0
Question (java) why wont this compile?

public class pc
{
public static void main(String[] args)
{
String[] data = new String[5];
data[0] = "hex";
data[1] = "dssdfsk";
data[2] = "dsfafd";
data[3] = "dafsad";
data[4] = "dadfad";
}
}
I am a noob...(there I'll admit it)
__________________
"We are all prophets, that is why we make so many mistakes"

"One who wears a mask wants to become someone else
one who wears a mask somewhere other than the face wants to become many"

"The truth is a lie"

"There are only a few free people in the world, the insane"

System: The System
CPU
e6600
Motherboard
asus striker extreme
Memory
2gb supertalent pc2 6400
Graphics Card
Evga 8800 gtx
Hard Drive
maxtor
Sound Card
stock
Power Supply
coolermaster 550watt
Case
Thermaltake Kandalf (Modded)
CPU cooling
big typhoon
GPU cooling
8800 tx evga
OS
xp professional
Monitor
1920*1200 ress sony

Last edited by ModeX : 03-23-07 at 08:43 PM.
ModeX is offline   Reply With Quote
Old 03-23-07   #2 (permalink)
Intel Overclocker
 
cgrado's Avatar
 
intel nvidia

Join Date: Feb 2006
Location: Sugar Land, Texas
Posts: 4,965

Rep: 229 cgrado is acknowledged by manycgrado is acknowledged by manycgrado is acknowledged by many
Unique Rep: 175
FAQs Submitted: 1
Folding Team Rank: 254
Hardware Reviews: 1
Trader Rating: 1
Default

I copied and pasted, and it compiles fine for me. what are you using for editing, compiling and running?
__________________
Quote:
Originally Posted by TwIsTeDbOi View Post
What's next, banning mirrors because, oh no god forbid, if we see ourselves naked we're gunna be traumatized?
I'm like the inquirer, take everything i say with a grain of salt.
SLi Zone PSU listing- check to see if your PSU is SLi certified.
BF2 stats BF2142 stats
My Guide to BF2 Unlocks

System: Immortal
CPU
E6600 44G 3.240GHz
Motherboard
Asus P5B-deluxe
Memory
2GB PQIturbomem 667(800mhzballistix soon)
Graphics Card
eVGA 8800GT (650/950)
Hard Drive
1x 400GB Seagate 7200rpm/16mb cache
Sound Card
X-fi Xtremegamer
Power Supply
610w PCP&C silencer
Case
TTArmor w/side fan
CPU cooling
Custom Watercooling
GPU cooling
Stock EVGA
OS
Windows XP Home/Ubuntu
Monitor
NEC MultiSync LCD1970GX
cgrado is offline I fold for Overclock.net cgrado's Gallery   Reply With Quote
Old 03-24-07   #3 (permalink)
nVidia Enthusiast
 
ModeX's Avatar
 
intel nvidia

Join Date: Oct 2006
Posts: 348

Rep: 6 ModeX Unknown
Unique Rep: 6
Trader Rating: 0
Default

I'm using netbeans IDE every time I try to compile it says ']' <identifier> expected, and it won't compile.....hmmmm wonder why..
__________________
"We are all prophets, that is why we make so many mistakes"

"One who wears a mask wants to become someone else
one who wears a mask somewhere other than the face wants to become many"

"The truth is a lie"

"There are only a few free people in the world, the insane"

System: The System
CPU
e6600
Motherboard
asus striker extreme
Memory
2gb supertalent pc2 6400
Graphics Card
Evga 8800 gtx
Hard Drive
maxtor
Sound Card
stock
Power Supply
coolermaster 550watt
Case
Thermaltake Kandalf (Modded)
CPU cooling
big typhoon
GPU cooling
8800 tx evga
OS
xp professional
Monitor
1920*1200 ress sony
ModeX is offline   Reply With Quote
Old 03-24-07   #4 (permalink)
Rabble rabble
 
TwIsTeDbOi's Avatar
 
intel nvidia

Join Date: Oct 2006
Location: 29 Palms(stumps), CA
Posts: 2,305

Rep: 134 TwIsTeDbOi is acknowledged by manyTwIsTeDbOi is acknowledged by many
Unique Rep: 108
Trader Rating: 3
Default

Try;

String[] data = {" ", " ", " ", " ", " "};

and then continue on with your code.

As for a compiler I suggest BlueJ. I use it at school and at home and it rocks.
__________________
Quote:
Originally Posted by DuckieHo View Post
Your carbon fiber is probably turbostratic while you need heat-treated mesophase-pitch-derived carbon fibers for thermal conductivity.
"For a wounded man shall say to his assailant, 'If I live, I will kill you. If I die, you are forgiven.' Such is the rule of honor"
Overclock.net TOS: Live it. Love it.
THE CHEVY Owners CLUB!!!

System: Sony Vaio AR730
CPU
T8100
Motherboard
Sony
Memory
3GB DDR667
Graphics Card
8400GT
Hard Drive
2x 160GB
Sound Card
SigmaTel HD
Power Supply
The wall
Case
Laptop
CPU cooling
Laptop
GPU cooling
Laptop
OS
Vista Home Premium
Monitor
17" 1440x900
TwIsTeDbOi is offline Overclocked Account   Reply With Quote
Old 03-24-07   #5 (permalink)
nVidia Enthusiast
 
ModeX's Avatar
 
intel nvidia

Join Date: Oct 2006
Posts: 348

Rep: 6 ModeX Unknown
Unique Rep: 6
Trader Rating: 0
Default

Quote:
Originally Posted by TwIsTeDbOi View Post
Try;

String[] data = {" ", " ", " ", " ", " "};

and then continue on with your code.

As for a compiler I suggest BlueJ. I use it at school and at home and it rocks.
I know that method works, but I wanted to be able to use the number index of the other method.

Sure I'll give blue a try
__________________
"We are all prophets, that is why we make so many mistakes"

"One who wears a mask wants to become someone else
one who wears a mask somewhere other than the face wants to become many"

"The truth is a lie"

"There are only a few free people in the world, the insane"

System: The System
CPU
e6600
Motherboard
asus striker extreme
Memory
2gb supertalent pc2 6400
Graphics Card
Evga 8800 gtx
Hard Drive
maxtor
Sound Card
stock
Power Supply
coolermaster 550watt
Case
Thermaltake Kandalf (Modded)
CPU cooling
big typhoon
GPU cooling
8800 tx evga
OS
xp professional
Monitor
1920*1200 ress sony
ModeX is offline   Reply With Quote
Old 03-24-07   #6 (permalink)
Intel Overclocker
 
cgrado's Avatar
 
intel nvidia

Join Date: Feb 2006
Location: Sugar Land, Texas
Posts: 4,965

Rep: 229 cgrado is acknowledged by manycgrado is acknowledged by manycgrado is acknowledged by many
Unique Rep: 175
FAQs Submitted: 1
Folding Team Rank: 254
Hardware Reviews: 1
Trader Rating: 1
Default

yeah, i'm using BlueJ. It's plain and simple, great for learning.
__________________
Quote:
Originally Posted by TwIsTeDbOi View Post
What's next, banning mirrors because, oh no god forbid, if we see ourselves naked we're gunna be traumatized?
I'm like the inquirer, take everything i say with a grain of salt.
SLi Zone PSU listing- check to see if your PSU is SLi certified.
BF2 stats BF2142 stats
My Guide to BF2 Unlocks

System: Immortal
CPU
E6600 44G 3.240GHz
Motherboard
Asus P5B-deluxe
Memory
2GB PQIturbomem 667(800mhzballistix soon)
Graphics Card
eVGA 8800GT (650/950)
Hard Drive
1x 400GB Seagate 7200rpm/16mb cache
Sound Card
X-fi Xtremegamer
Power Supply
610w PCP&C silencer
Case
TTArmor w/side fan
CPU cooling
Custom Watercooling
GPU cooling
Stock EVGA
OS
Windows XP Home/Ubuntu
Monitor
NEC MultiSync LCD1970GX
cgrado is offline I fold for Overclock.net cgrado's Gallery   Reply With Quote
Old 03-24-07   #7 (permalink)
110100001101001111000
 
C-bro's Avatar
 
intel nvidia

Join Date: Jan 2006
Location: Hamilton, ON
Posts: 1,832

Rep: 283 C-bro is a proven memberC-bro is a proven memberC-bro is a proven member
Unique Rep: 215
FAQs Submitted: 6
Folding Team Rank: 237
Hardware Reviews: 9
Trader Rating: 1
Default

What version of Netbeans do you have? I'm on 5.5 on that compiles just fine for me.

System: RAID0R
CPU
Intel E2180 3.33GHz
Motherboard
Asus P5K-E/WIFI-AP vMod
Memory
2GB Kingmax DDR2-1066
Graphics Card
EVGA 8800GT
Hard Drive
2x250GB WD+500GB 7200.11
Sound Card
SB Audigy 2
Power Supply
Corsair CMPSU-550VX
CPU cooling
Arctic Cooling Freezer 7 Pro
GPU cooling
Zalman VF900-Cu
OS
Windows Vista Business 32-Bit
Monitor
HP F2105 21" & Samsung 712N
C-bro is offline I fold for Overclock.net Overclocked Account C-bro's Gallery   Reply With Quote
Old 03-24-07   #8 (permalink)
PC Gamer
 
TriplePlay's Avatar
 
amd nvidia

Join Date: Sep 2005
Location: Georgia Tech N. Ave Apts
Posts: 2,404

Rep: 96 TriplePlay is acknowledged by some
Unique Rep: 89
Hardware Reviews: 1
Trader Rating: 0
Default

I use JGrasp, and it works fine.
__________________
"You're an inspiration for birth control." -Duke Nukem


System: Ramblin' Wreck
CPU
AMD Turion 64 X2 TL-56
Motherboard
HP
Memory
2GB DDR2
Graphics Card
GeForce Go 7200 64MB
Hard Drive
80GB 5400RPM SATA + 500GB external
Sound Card
Integrated
Power Supply
Laptop Battery & AC Adapter
Case
HP Laptop
CPU cooling
Stock laptop cooling
GPU cooling
Stock laptop cooling
OS
Windows Vista Home Premium 32-bit
Monitor
15" widescreen laptop LCD
TriplePlay is offline   Reply With Quote
Old 03-25-07   #9 (permalink)
nVidia Enthusiast
 
ModeX's Avatar
 
intel nvidia

Join Date: Oct 2006
Posts: 348

Rep: 6 ModeX Unknown
Unique Rep: 6
Trader Rating: 0
Default

I'm using 5.5, when you say it compiles fine are you you using my example, because if you are ***?!?!?

EDIT:mmmm... as I said before I'm a noob, are arrays limited to the 1st Class?
__________________
"We are all prophets, that is why we make so many mistakes"

"One who wears a mask wants to become someone else
one who wears a mask somewhere other than the face wants to become many"

"The truth is a lie"

"There are only a few free people in the world, the insane"

System: The System
CPU
e6600
Motherboard
asus striker extreme
Memory
2gb supertalent pc2 6400
Graphics Card
Evga 8800 gtx
Hard Drive
maxtor
Sound Card
stock
Power Supply
coolermaster 550watt
Case
Thermaltake Kandalf (Modded)
CPU cooling
big typhoon
GPU cooling
8800 tx evga
OS
xp professional
Monitor
1920*1200 ress sony

Last edited by ModeX : 03-25-07 at 12:20 AM.
ModeX is offline   Reply With Quote
Old 03-25-07   #10 (permalink)
Photography nut
 
dangerousHobo's Avatar
 
amd nvidia

Join Date: Dec 2005
Location: ~/
Posts: 3,470

FAQs Submitted: 7
Folding Team Rank: 390
Trader Rating: 0
Default

Quote:
Originally Posted by ModeX View Post
I'm using 5.5, when you say it compiles fine are you you using my example, because if you are ***?!?!?

EDIT:mmmm... as I said before I'm a noob, are arrays limited to the 1st Class?
I compiled it and ran it in both a terminal and netbeans and it worked.

Code:
package javaapplication1;

public class Main {
     
    public static void main(String[] args) {
   
        String[] data = new String[5];
        data[0] = "hex";
        data[1] = "dssdfsk";
        data[2] = "dsfafd";
        data[3] = "dafsad";
        data[4] = "dadfad";
        for (int i=0;i<5;i++)
            System.out.println(data[i]);

    }
}
__________________
"UNIX was never designed to keep people from doing stupid things, because that policy would also keep them from doing clever things." - Doug Gwyn

Try out the latest Programming Challenge
Quote:
Originally Posted by Melcar
Only one reasonable way to solve this... a dance off.

CPU-Z Validation
@ 2.97-prime95 stable 16 hours @ 1.48v Proof | CPU-Z Validation @ 3.15


Getting Mouse Side Buttons to work in Linux, Compile a custom Kernel, More

System: Anomaly
CPU
Athlon 3700 SD(KACAE)0546 @3.02ghz
Motherboard
DFI UT nF4 Ultra-D
Memory
G.Skill 2x512 UTT(BH-5)
Graphics Card
evga 6800gs
Hard Drive
Maxtor 300GB + WD 250GB
Sound Card
onboard
Power Supply
Ultra 500w V-series
Case
one from Ultra
CPU cooling
Big Typhoon
GPU cooling
80mm fan mounted on
OS
Arch64
Monitor
Acer AL2216W 22" WS LCD
dangerousHobo is offline I fold for Overclock.net Overclocked Account dangerousHobo's Gallery   Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools



All times are GMT -4. The time now is 01:24 PM.


Overclock.net is a Carbon Neutral Site Creative Commons License Internet Security By ControlScan

Terms of Service / Forum Rules | Privacy Policy | Advertising | Become an Official Vendor
Copyright © 2008 Shogun Interactive Development. Most rights reserved.
Page generated in 0.32160 seconds with 8 queries