- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 3
- Posts with Downvotes
- 3
- Downvoting Members
- 2
14 Posted Topics
[QUOTE=24x24;1475465]I am to write a program that converts either binary, hex or octal to decimal. We are to use methods for the first time (Not a problem). I have written almost all of the code but the conversion. We can't use int.toDecimal or any shortcut. All must be long coded …
[QUOTE=McCurry0x77;1475577]I'm trying to run through a file and add each string in the file to a string array. My code yields the error "Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0 at StudentLAM.main(StudentLAM.java:14)" Why doesn't this work? Note: I cannot use ArrayList. My error-yielding code: [CODE] private Scanner index; int cell = …
[QUOTE=privatestatic;1454505]hey guys i got this new project for my java class and got the overall idea but my code still does not seem to work ...here are the directions: - make a 5X5 boolean array assign 5 random elements for 5 ships - user can have 15 guesses to find …
[QUOTE=amr321;1447803][B]Hi everyone I would like to take your advice about my situation This is my second year in university and my major is computer science and my programming skill is very weak:'( and I finish data structure by Miracle :icon_cry:and until now I can’t solve any assignment by myself:icon_sad:, so …
[QUOTE=hao90;1448839]How to let the button set to it "latest" text because i suppose to set the button's text to "booked" and the foreground to red. However, everytime i re-run the program, the button re-set. I know i should do something on constructor, but how? Here is my coding.. Thanks for …
[QUOTE=coco24;1445818]This is the code that I have to remove the duplicates, but I keep getting an error on the last line (temp.remove) [code] public static void removeDuplicates(int [] temp) { // Fill in your code here for(int i = 0; i< temp.length-1; i++) if(temp[i] == temp[i+1]) temp.remove[i]; } } [/code][/QUOTE] …
[QUOTE=Akill10;1434390] You can only switch on integer constants (static final int) or literals. [/QUOTE] I dont get what you are trying to say. I think you can switch with any value as long as it is: char, byte, short or int. It doesnt have to be Constant.. Ex: [CODE] import …
[QUOTE=pigmario;1434409]I have a text file contain a coordinate 100,20 240,100 23,45 I manage to read row and split it into and integer. and get it to point x=100 ,y=20. the problem is in the end i got a null when i print in console show a null like this 100 …
[QUOTE=javap;1431838]I want help in writing a digit display(3 digit number) in java (using sub strings). Example 524 if user inputs then computer has to display 5 2 4.[/QUOTE] [ICODE] import java.util.*; public class InputSub { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.print("Number Input: "); String …
[QUOTE=techalerts;1431655]hi frnds, i completed mca 5th semister. now i want to do a project on java. could any one help me what are the current best projects on java?[/QUOTE] I think <code>firstperson</code> idea is great. can I get involved in your projects?..
The else statement assigns a value of (1) to the variable (i) in the for loop. As a result, your increment statement in the for loop(i++) is useless because you assign an integer value of (1) to the variable (i) all the time, this is an infinite loop.
[QUOTE=DanieltheE;1431057]hello all, this is my first post here and I have searched for answers elsewhere before asking for help. My code is pretty tight, but I keep coming up with symbol not found errors. Are my curlys not in the right place? Or have i not declared the objects correctly. …
[QUOTE=newcoder310;1430352]i tried making it public but it is not recognising the package at all. also the class[/QUOTE] You need to compile the classes in the package using javac command. Befor compiling a class that imports another class in the package, you must compile the class it imports first. The reason …
Im new to java and I would like to participate in some small projects.. let me know and I'll be glad to work with yha..
The End.
JKP()