Basically, I have a slight problem with interprating a remove feature. The user clicks on a button that is in the ListView, a PopupMenu is then promted and displays "Unfriend", "Unfollow", "Messgae"...
Type: Posts; User: ProgrammablePeter
Basically, I have a slight problem with interprating a remove feature. The user clicks on a button that is in the ListView, a PopupMenu is then promted and displays "Unfriend", "Unfollow", "Messgae"...
I cracked the problem. It was occurring at line 62:
friendList.add(new Friend(nameBlock[i], descBlock[i], imageBlock[i]));
The reason: I have an xml. string-array that had 1 value. And I was...
public class MainActivity extends ListActivity {
private ArrayList<Friend> friendList;
private EditText et;
private int[] imageBlock;
private String[] nameBlock;
private String[] descBlock;...
I've never actually understood what they key word ".this" is in Java, my lecturer seems to use it in every single place in his code. And when I asked him, he just said "I don't really know myself" ...
What I'm trying to do here is apply id's to all of the Vehicle's objects in my program.
When a vehicle is added the counter should turn to 1... and increment every time a vehicle is added.
So...
Not sure how to implement this. I basically want to search a Stack for a particular Object value
Could someone provide an example of how to achieve this. Plain english? Possibly some PSUEDO
...
public Node replace(Object data, Object value) {
Node current = head;
while(current != null) {
if(current.getData() == data) {
current.setData(value);
return current;
}...
Hey Guys, Could somebody point me in the right direction to replacing a node in a linked list?
I have no clue on where to start, thus. I have no code to supply.
I current have, a destory...
Cheers, I've used that way. Didn't realise I could do it from a text file, added them now. Cheers Kevin!
Is there a way in my preferred JAVA IDE (Eclipse/Netbeans) in which i can construct an array of US Cities. I'm creating a Tree in which the user can select a runnable server. So in this case, the...
From an experienced Programmers point of view, or any level of Programers point of view. What would be a right way of commenting your code. What should I note and what should I note? Is too much...
Just out of curiosity what operating system are you running? 32-bit/64-bit?
--- Update ---
Wow that is super weird, I downloaded the file from pastebin that I uploaded and then slammed it into...
database.txt - Pastebin.com
Thanks for helping man, appreciate it!
That made it alot better, but still. I added a counter, notepad++ says there is 998 lines and the counter says there is 610 lines, 300 lines of the text file is missing! So frustrating!
So I have a text file which is 47 kb big, it includes database information.
Basically I have a problem the scanner only seems to output up to a random line and then completely stop.
Scanner x...
Not very helpful. I already know I need a while loop. But, I just don't know where it should be, or how it should be structured≈...
So what I'm trying to do is take String input and validation to the following correspondences:
1. Take no Digits "1234567890"
2. Take no Symbols/Special Characters "!@£$%^&*()"
OUTPUT FROM...
So the theory is, convert a number to the worded value. 1 = ONE 2 = TWO 3 = THREE etc.. If user enters anything over 5 then display the numerical value of its type. The problem is this:
The output...
Basically all I'm after is to be able to format a String that is inputted by the user:
For example:
My code would look something like this:
public class TestData {
public static void...
Okay, thank-you for your advise. Greatly appreciated! and I have no idea why i'm passing in the variable premium when i'm changing it in the method. I study Computer Science 1st year, and we have...
Haha, thank-you. Sorry about that :/
So basically, I am developing a program to calculate Annual and Monthly premiums for Insurance.
I am a beginners level Java Programmer. Studying Computer Science. and here is my code.
...