Click here to Skip to main content
15,900,108 members
Home / Discussions / Java
   

Java

 
QuestionjTable Pin
Shaahinm30-Aug-11 1:40
Shaahinm30-Aug-11 1:40 
QuestionHow to know user still connect to my website in local network ? Pin
tannghia28-Aug-11 17:28
tannghia28-Aug-11 17:28 
AnswerRe: How to know user still connect to my website in local network ? Pin
jschell29-Aug-11 9:10
jschell29-Aug-11 9:10 
Questioni got java.lang.NullPointerException error while delteing and adding new data inms access DB-pls guide me to solve Pin
jpljayapal27-Aug-11 8:42
jpljayapal27-Aug-11 8:42 
AnswerRe: i got java.lang.NullPointerException error while delteing and adding new data inms access DB-pls guide me to solve Pin
jschell28-Aug-11 8:08
jschell28-Aug-11 8:08 
QuestionComputer talks to u Pin
Had12327-Aug-11 5:48
Had12327-Aug-11 5:48 
AnswerRe: Computer talks to u Pin
Smithers-Jones27-Aug-11 23:48
Smithers-Jones27-Aug-11 23:48 
QuestionGetting the lowest values in one array, and then counting them. Pin
Tor Danielsen25-Aug-11 7:27
Tor Danielsen25-Aug-11 7:27 
btw, this is one exercice from one book and I'm starting on Java classes next week. so it IS from the school book but I don't got the patience to wait, already on chapter 7 =)

I got this array
Java
int[] waste = {6,4,0,4,3,8,4,4,6,8};


the task is to make one function find the lowest value an how many if them to the output.
now I've been thinking on something like this

Java
public int getLowWaste() {
    int maksDager = 0;
    int sum = 0;
    for(int i=0; i<waste.length; i++) {
        if(waste[i]<waste) {
            maksDager = waste[i];
            sum++;
        }

    }
    return maksDager;
}


now I think this should work to get the lowest value of the array, but not how many of them.. I'm thinking that it will see 6, mark it as the lowest, go to next value and if it's lower, mark it as lowest and so on. but when the values are changed, how so I reset the counter ?
AnswerRe: Getting the lowest values in one array, and then counting them. Pin
AspDotNetDev25-Aug-11 8:46
protectorAspDotNetDev25-Aug-11 8:46 
GeneralRe: Getting the lowest values in one array, and then counting them. Pin
Tor Danielsen25-Aug-11 10:25
Tor Danielsen25-Aug-11 10:25 
Questionsound in java Pin
Mhmud emam24-Aug-11 19:48
Mhmud emam24-Aug-11 19:48 
AnswerRe: sound in java Pin
Firo Atrum Ventus24-Aug-11 19:55
Firo Atrum Ventus24-Aug-11 19:55 
QuestionCPU usage per process Pin
kartikdasani22-Aug-11 1:42
kartikdasani22-Aug-11 1:42 
AnswerRe: CPU usage per process Pin
Richard MacCutchan22-Aug-11 2:20
mveRichard MacCutchan22-Aug-11 2:20 
AnswerRe: CPU usage per process Pin
jschell22-Aug-11 9:33
jschell22-Aug-11 9:33 
GeneralRe: CPU usage per process Pin
David Skelly22-Aug-11 22:01
David Skelly22-Aug-11 22:01 
Questionstegnography in java Pin
ROHIT_BHATIA21-Aug-11 8:00
ROHIT_BHATIA21-Aug-11 8:00 
AnswerRe: stegnography in java Pin
David Skelly21-Aug-11 22:00
David Skelly21-Aug-11 22:00 
AnswerRe: stegnography in java Pin
Manfred Rudolf Bihy22-Aug-11 3:53
professionalManfred Rudolf Bihy22-Aug-11 3:53 
QuestionJava Applet not drawing to screen [modified] Pin
Liam S. Crouch20-Aug-11 4:33
Liam S. Crouch20-Aug-11 4:33 
AnswerRe: Java Applet not drawing to screen Pin
Richard MacCutchan20-Aug-11 6:41
mveRichard MacCutchan20-Aug-11 6:41 
GeneralRe: Java Applet not drawing to screen Pin
Liam S. Crouch20-Aug-11 7:44
Liam S. Crouch20-Aug-11 7:44 
GeneralRe: Java Applet not drawing to screen Pin
Richard MacCutchan20-Aug-11 23:28
mveRichard MacCutchan20-Aug-11 23:28 
GeneralRe: Java Applet not drawing to screen Pin
Richard MacCutchan21-Aug-11 8:18
mveRichard MacCutchan21-Aug-11 8:18 
QuestionHow to save the state of applet after changes on webpage? Pin
CodeGust17-Aug-11 15:35
CodeGust17-Aug-11 15:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.