- Strength to Increase Rep
- +12
- Strength to Decrease Rep
- -3
- Upvotes Received
- 30
- Posts with Upvotes
- 27
- Upvoting Members
- 23
- Downvotes Received
- 18
- Posts with Downvotes
- 14
- Downvoting Members
- 8
Re: 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] | |
Re: 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 … | |
Re: please do NOT send it. Clearly they want it for homework. | |
Re: 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] | |
Re: [Code] JTextField.setHorizontalAlignment(JTextField.RIGHT); [/Code] | |
Re: [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 … | |
Re: [QUOTE=jwenting][url]http://www.vim.org[/url] All you need.[/QUOTE] pshhhhh. All you need is JEdit. :cool: | |
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 … | |
Re: 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] | |
Re: 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 … | |
Re: 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 … | |
| |
Re: 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. | |
Re: 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? | |
Re: 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(); | |
Re: You should post a seperate thread, so that you don't distract away from this thread starter. | |
Re: You want us to do your homework for you? | |
Re: import java.util.*; DecimalFormat dec = new DecimalFormat("###.##"); System.out.println(dec.format(value)); | |
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? | |
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 … | |
Re: 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 … | |
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: … | |
| Re: 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)); |
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 … | |
Re: 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 … | |
Re: Since it's abstract shouldn't you override that method and implement your own version, instead of calling that method? | |
Re: String pass = "crap"; If ( pass.length() > 6 && pass.length() < 15 ) { } | |
Re: I bet you could get some help in the JSP forum. |