Posts
 
Reputation
Joined
Last Seen
Ranked #405
Strength to Increase Rep
+12
Strength to Decrease Rep
-3
69% Quality Score
Upvotes Received
30
Posts with Upvotes
27
Upvoting Members
23
Downvotes Received
18
Posts with Downvotes
14
Downvoting Members
8
14 Commented Posts
31 Endorsements
Ranked #42
Ranked #417
~380.67K People Reached
Favorite Tags

1,034 Posted Topics

Member Avatar for jengels

Maybe something like this would work, but I'm not sure: [Code] String text = textArea.getText(); int upperCaseCount = 0; for (int i=0; i<text.length(); i++) { for(char c='A'; c<='Z'; c++) { if (text.charAt(i) == c) { upperCaseCount++; } } } [/Code]

Member Avatar for JamesCherrill
0
4K
Member Avatar for cancer10

There's isn't a cd out there that's impossible to copy. You don't need any special kind of software, actually there's a program out there called "Alcohol 120%" that can copy any protected cd, even the strongest protection to date. I guess you could look into apply some of these copy …

Member Avatar for Rabah
-1
536
Member Avatar for stupidenator
Member Avatar for oberle1515

Just some simple nested loops are involved: [Code] class Pattern { public static void main(String[] args) { for (int i=1; i<=6; i++) { for (int j=1; j<=i; j++) { System.out.print(j); } System.out.println(""); } } } [/Code]

Member Avatar for pritaeas
-1
479
Member Avatar for Gink
Member Avatar for vrebo
0
145
Member Avatar for Ghost

[Code] static int countChars( String str, char searchChar ) { // Count the number of times searchChar occurs in // str and return the result. int i; // A position in the string, str. char ch; // A character in the string. int count; // Number of times searchChar has …

Member Avatar for JamesCherrill
0
3K
Member Avatar for Croft .L

[QUOTE=jwenting][url]http://www.vim.org[/url] All you need.[/QUOTE] pshhhhh. All you need is JEdit. :cool:

Member Avatar for jawad.hassan.5836
0
818
Member Avatar for server_crash

I know that you can call this method to delete a row from a JTable: [Code] DefaultTableModel.deleteRow(index); [/Code] I need to delete all of the rows at some point, and this is not working: [Code] for (int i=0; i<dtm.getRowCount(); i++) { dtm.removeRow(i); mortgageTable.revalidate(); } [/Code] I tried revalidating, but that …

Member Avatar for Layki
0
6K
Member Avatar for sam1

try this link: [url]http://www.google.com/search?client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial_s&hl=de&q=inurl%3Ajava+filetype%3Apdf&lr=&btnG=Google-Suche[/url] Actually, my browser is in german so you might not get english results. So just copy and paste this into google search and it will come up some ebooks(pdf files): [Code] inurl:java filetype:pdf [/Code]

Member Avatar for Rahul_25
0
162
Member Avatar for bohm13rit

This is how I would do it: [Code] public class ReverseString { public String reverse(String arg) { String tmp = null; if (arg.length() == 1) { return arg; } else { //extract the last char String lastChar = arg.substring(arg.length()-1,arg.length()); //extract the remaining chars String remainingString = arg.substring(0, arg.length() -1); tmp …

Member Avatar for teachMyself
0
957
Member Avatar for orionscode

I'll have to agree with Rashakil on this one. Math is extremely important. A few years back I would have told you that math is just worthless crap you will never use, but once you get into the more strenuous classes you'll see the real importance of it. I have …

Member Avatar for ThatGuyEli
0
1K
Member Avatar for cancer10
Member Avatar for wjay152
1
2K
Member Avatar for Black Knight

Yes, the URL Object should make that work. Knight, is this JAR file an executable JAR file? If it is, could you show me how you did it? I tried once and never could get mine to work, even though everything was correct.

Member Avatar for joyal
0
1K
Member Avatar for gzero14
Member Avatar for sidereal
Member Avatar for Rajnesh

You should be able to use Process: Process p = Runtime.getRuntime().exec(command); command is a string you pass. What's the error you're recieving?

Member Avatar for stultuske
1
2K
Member Avatar for ecyarter

Why don't you take the number of characters the textfield is long, and how many characters the input is long, and formulate a center point out of that...Of course I would rather use setHorizontalAlignment();

Member Avatar for hfx642
0
6K
Member Avatar for AQWst

You should post a seperate thread, so that you don't distract away from this thread starter.

Member Avatar for stultuske
0
421
Member Avatar for vbmore
Member Avatar for perlsu

import java.util.*; DecimalFormat dec = new DecimalFormat("###.##"); System.out.println(dec.format(value));

Member Avatar for mubin_89
1
4K
Member Avatar for server_crash

I've often pondered over this subject. I know the main method has a special signature the JVM looks for, but why is it static?

Member Avatar for Taywin
0
600
Member Avatar for server_crash

I've looked and looked for some good material on this exception, but I can't find anything helpful. I just don't understand it. It's suppose to be caught or thrown whenever a method is called when not suppose to be...But won't other exceptions be caught or thrown in it's place? If …

Member Avatar for GoogleException
0
197
Member Avatar for Roxsy3392

When you look at how much money is spent to keep ONE prisoner in prison, then it's just not fair to let them live. For me, it all depends on what they did. This mousaoui dude shouldn't get the death penalty because that's letting him off easy. What should happen …

Member Avatar for jwenting
0
2K
Member Avatar for server_crash

I've created a jar file like this: jar cfmv Manifest.mf RoboPlot.jar RoboPlot.class ImagePlotter.class The manifest.mf file looks like this: Main-Class:RoboPlot For some reason, when I use this command to run it, java -jar RoboPlot.jar it tells me that the main class could not be found I also tried this: Manifest-Version: …

Member Avatar for stultuske
0
222
Member Avatar for Geek-Master

Not that it's important or anything, but you can initialize all the elements to a specific value: vector< vector< double > > matrix( row, vector<double>(row, int_val));

Member Avatar for Hialek
0
5K
Member Avatar for server_crash

I made this simple program that prints out all the factors of a given number. The only problem is that it prints out the numbers in different order...For example: factors of 12: 1*12 2*6 3*4 but this is what my program prints out: 1*12 2*6 3*4 [B]4*3 6*2 12*1[/B] It's …

Member Avatar for Momerath
0
162
Member Avatar for MFal

Debugging 101: Put some system.out.println()'s throughout the actionPerformed() method, and all methods it calls. check to make sure all variables have the proper values, and that it even enters certain methods. By the way, what are you doing with these lines: Numtemp = displayN.getText(); Base = displayB.getText(); If those are …

Member Avatar for Ezzaral
0
3K
Member Avatar for luisator

Since it's abstract shouldn't you override that method and implement your own version, instead of calling that method?

Member Avatar for Ezzaral
0
170
Member Avatar for topaz
Member Avatar for stultuske
0
183
Member Avatar for mikesilvey
Member Avatar for stupidenator

I think you would have to create a PixelGrabber which returns an array of ints made from the image. Once you have that, I think you could use this method to convert the ints to binary: Integer.toBinaryString(int); Here is an example of a Pixel Grabber that creates a screen shot …

Member Avatar for Urchin1111
0
477
Member Avatar for chound
Re: Ps3

I never got into video games that much but if I did I would probably buy used games or ask a friend if I could borrow one for a few days.

Member Avatar for happygeek
0
146
Member Avatar for mikeandike22

[QUOTE=mikeandike22]ok i want to make a program to show a teacher at my school so i can get into computer Ap which teaches you java(but they say u have to know stuff to get in it makes no sense i am in highschool). [/QUOTE] I would learn it over the …

Member Avatar for Nmanpure Pkr
0
236
Member Avatar for guessvic

For something like that I would say some if else statements would work. Like: [code] if (!card slot is already taken) { //do something } else { //do something else } [/code] Of course it would be cool to experiment making your own exception as EB said.

Member Avatar for geerthan08
0
331
Member Avatar for rony
Member Avatar for jengels

[QUOTE=jwenting]turns them into lazy bastards [/QUOTE] lol :cheesy: I agree though, you should of at least let him show a little effort..I mean even if it was a bunch of method and class stubs, at least it would have been some effort.

Member Avatar for apines
0
166
Member Avatar for vegaseat

[QUOTE=Chaky]Guy walks in a bar holding a big turd in both hands, showing it around and saying: "Look at what I almost steeped on!"[/QUOTE] hahhahahhahahahhahahaha

Member Avatar for crunchie
0
858
Member Avatar for nizzy1115
Member Avatar for sam1
Member Avatar for mahes_

I think you got it backwards. compareTo() is used to compare Objects. It tests if THIS object is of the same type as the parameterized object. For instance, String s = "t"; String s2 = "sdfsa"; s.compareTo(s2); ///would be true .equals() compares the contents of the object. For instance, String …

Member Avatar for rvntdhillon
0
222
Member Avatar for Ghost

I'll give you a screenshot of my favorite project, although it didn' take ver long.

Member Avatar for masijade
0
614
Member Avatar for kratoras

If you simply trying to replace one character like that, use the replace method: [Code] class ReplaceAll { public static void main(String[] args) { String s = "Replace /, /, and /"; String replace = s.replace('/','r'); System.out.println(replace); } } [/Code]

Member Avatar for Rajesh1202
0
241
Member Avatar for MonkeyCode
Member Avatar for dina
Member Avatar for Elisa

I have both of the books wmivey just specified{java in 24 hours and java primer plus}. I would definately go with these.

Member Avatar for yasuodancez
0
364
Member Avatar for gpta_varun

[QUOTE=gpta_varun] one bottle out of 32 wine bottles is posioned with such poison that even one drop of it can kill a person.but any quantity of this poison kills exactly in 32 days.how will you find out the bottle with poisoned wine using min number of taste testers in 32 …

Member Avatar for Agilemind
0
300
Member Avatar for tristan17

[QUOTE=hooknc]I'm betting this is a compile error? Your compiler can't find the class MyInput. Make sure that MyInput is in your classpath. Regards, Nate[/QUOTE] Yep. You're using a third party class to read input. I'm guessing it's either came with a book, or your teacher supplied it. Either way you …

Member Avatar for naushadahmed
0
192
Member Avatar for Java John needs

I JUST gave you the answer to this problem a couple of days ago. Your program works fine...Nowhere in your code do you actually run the program though..What do you expect it do output if you don't make it output. This is the link...Don't crosspost. If you have further questions …

Member Avatar for mikeNIkesT
0
534
Member Avatar for NewbyChic

I had to do a diamond once, making two triangles. I could post the code if you need it, but it looks like you've already got it solved.

Member Avatar for javaAddict
0
178
Member Avatar for server_crash

The End.