When measuring 6 voltage signals in labview I found that there was a difference in voltage signals in my program but not in the test panel. The test panel is correct. What is wrong with my program?

My labview program is not displaying equivelent voltages, but labview test panel is. So the computer is seeing the correct signals. My program is displaying a small difference in 3 out of 6 channels. All channels should be equal.

G'Day Pops,
You haven't really given us enough to go on - could you please post your VI so we can have a look at it?
cheers,
Christopher
Christopher G. Relf
Certified LabVIEW Developer
[email protected]
Int'l Voicemail & Fax: +61 2 8080 8132
Aust Voicemail & Fax: (02) 8080 8132
EULA
1) This is a private email, and although the views expressed within it may not be purely my own, unless specifically referenced I do not suggest they are necessarily associated with anyone else including, but not limited to, my employer(s).
2) This email has NOT been scanned for virii - attached file(s), if any, are provided as is. By copying, detaching and/or opening attached files, you agree to indemnify the sender of such responsibility.
3) B
ecause e-mail can be altered electronically, the integrity of this communication cannot be guaranteed.
Copyright © 2004-2015 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 2.5 License.

Similar Messages

  • I got CS4 software. When the first time i install, i chose the normal installation content. Then I found that there was no photoshop on the start menu. After that I try to put the disk into the notebook again and find that there is no photoshop listed on

    I got CS4 software. When the first time i install, i chose the normal installation content. Then I found that there was no photoshop on the start menu. After that I try to put the disk into the notebook again and find that there is no photoshop listed on the "installation list"

    download the cs4 design premium installation files and install ps using them,
    Downloadable installation files available:
    Suites and Programs:  CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4, CS4 Web Standard | CS3
    Acrobat:  XI, X | 9,8 | 9 standard
    Premiere Elements:  13 | 12 | 11, 10 | 9, 8, 7 win | 8 mac | 7 mac
    Photoshop Elements:  13 |12 | 11, 10 | 9,8,7 win | 8 mac | 7 mac
    Lightroom:  5.7.1| 5 | 4 | 3
    Captivate:  8 | 7 | 6 | 5.5, 5
    Contribute:  CS5 | CS4, CS3
    Download and installation help for Adobe links
    Download and installation help for Prodesigntools links are listed on most linked pages.  They are critical; especially steps 1, 2 and 3.  If you click a link that does not have those steps listed, open a second window using the Lightroom 3 link to see those 'Important Instructions'.

  • TS1363 My iPod doesn't turn on anymore. Even when I plug it into the computer or a charger, nothing happens. What's wrong with my iPod?

    My iPod doesn't turn on anymore. Even when I plug it into the computer or a charger, nothing happens. What's wrong with my iPod?

    If you get an network timed out error, try disabling the security software on your computer.

  • Recently installed OSX 10.8.2 and found that there was NO ~/Library and when I tried to create one I was told that it already exists.

    Recently installed OSX 10.8.2 and found that there was NO ~/Library and when I tried to create one I was told that it already exists.
    Does anyone know why ?

    It's hidden. Choose Go to Folder from the Finder's Go menu and supply that path to access it.
    (71284)

  • When i touch the button of the phone while charging it, it sparkles.  What is wrong with it?

    When i touch the button of the phone while charging it, it sparkles.
    What is wrong with it?

    For your purposes?  Probably nothing.
    If you want Apple to service the device under warranty, it has to be done at an Apple Authorized Service Provider.
    Look here: http://www.apple.com/ae/contact/
    This is how you contact Apple to find out what to do.

  • When I plug my Ipod in, it says that there was a malfunction in the USB...

    When I plug my Ipod in, it says that there was a malfunction in the USB deivce, and when I go to look at the drivers, it says no drivers are installed, and when I try to install/update them, it says that there is no better match.

    Not if you first do a sync and have iTunes make a backup. However, if your only copy of the iTunes data is in the Touch, then you need to first copy the data to a new iTunes Library using third-party software such as Phone To Mac.

  • What's wrong with this program?

    /* Daphne invests $100 at 10% simple interest. Deirdre invests $100 at 5% interest compounded annually. Write a program that finds how many years it takes for the value of Deirdre's investment to exceed the value of Daphne's investment. Aso show the two values at that time.*/
    #include <stdio.h>
    #define START 100.00
    int main(void)
    int counter = 1;
    float daphne = START;
    float deirdre = START;
    printf("Daphne invests $100 at 10 percent simple interest. Deirdre invests $100 at 5 percent interest compounded annually.
    When will Deirdre's account value exceed Daphne's?
    Let\'s find out.
    while (daphne > deirdre)
    daphne += 10.00;
    deirdre *= 1.05;
    printf("%f %f
    ", daphne, deirdre);
    printf("At year %d, Daphne has %.2f dollars. Deirdre has %.2f dollars.
    ", counter, daphne, deirdre);
    counter++;
    printf("By the end of year %d, Deirdre's account has surpassed Daphne's in value.
    ", counter);
    return 0;
    This is my output:
    *Daphne invests $100 at 10 percent simple interest. Deirdre invests $100 at 5 percent interest compounded annually.*
    *When will Deirdre's account value exceed Daphne's?*
    *Let's find out.*
    *By the end of year 1, Deirdre's account has surpassed Daphne's in value.*
    What's wrong with it?
    Message was edited by: musicwind95
    Message was edited by: musicwind95

    John hadn't responded at the time I started typing this, but I'll keep it posted anyways in order to expand on John's answer a little bit. The answer to your last question is that the loop's condition has to return true for it to run the first time around. To examine this further, let's take a look at the way you had the while loop before:
    while (daphne > deirdre)
    Now, a while loop will run the code between its braces as long as the condition inside the parenthesis (daphne > deirdre, in this case) is true. So, if the condition is false the first time the code reaches the while statement, then the loop will never run at all (it won't even run through it once -- it will skip over it). And since, before the while loop, both variables (daphne and dierdre) are set equal to the same value (START (100.00), in this case), both variables are equal at the point when the code first reaches the while statement. Since they are equal, daphne is NOT greater than dierdre, and therefore the condition returns false. Since the condition is false the first time the code reaches it, the code inside the loop's braces is skipped over and never run. As John recommended in the previous post, changing it to this:
    while (daphne >= deirdre)
    fixes the problem because now the condition is true. The use of the "greater than or equal to" operator (>=) instead of the "great than" operator (>) means that the condition can now be returned true even if daphne is equal to deirdre, not just if it's greater than deirdre. And since daphne and deirdre are equal (they are both 100.00) when the code first reaches the while loop, the condition is now returned true and the code inside the loop's braces will be run. Once the program reaches the end of the code inside the loop's braces, it will check to see if the condition is still true and, if it is, it will run the loop's code again (and again and again and again, checking to see if the condition is still true each time), and if it's not true, it will skip over the loop's bottom brace and continue on with the rest of the program.
    Hope this helped clear this up for you. Please ask if you have any more questions.

  • My optical drive will not read any music cds now or recognize a blank cd in the drive. it might read some data discs. what is wrong with it and how do i fix it?

    My optical drive will not read any music cds or recognize a blank cd. it might read some data cds. what is wrong with it and how can i fix it?

    The optics might be dirty. Try running a cleaning CD through it and see if that makes a difference.
    If not, it will have to be replace.
    Allan

  • Is there a problem w/itunes store site? after input my cr.card info, i was told that it cannot verify my address, which is correct, what's wrong with the edit the billing info screen?

    What is wrong with the edit biling info screen. it cannot verify my address. i triple check my address info
    and it is correct.

    Use the email form >  Apple - Support - iTunes Store - Contact Us

  • I have a mac pro and the light on my power cord is orange. what is wrong with my computer and how do i fix it?

    The light on my power cord is orange. What is wrong with it and how can I fix my computer?

    You have a Macbook Pro. A Mac Pro is a desktop. The light on your power cord is orange when it's charging. It turns green once it's fully charged.
    Matt

  • What's wrong with my program?

    Mission: A program which returns a digit based on what character you enter, and it should follow this structure:
    Digit to output / Character entered
    2 / ABC
    3 / DEF
    4 / GHI
    5 / JKL
    6 / MNO
    7 / PRS
    8 / TUV
    9 / WXY
    If you enter the letters Q, Z or any nonalphabetic letter, the program should output that an error was encountered. Must have two buttons, one for "Ok" and one for "Quit".
    I made this code so far, which gives me tons of errors I don't get much out of:
    import java.awt.*;
    import java.awt.event.*;
    public class digit
    // Define action listener for alphabetic buttons
    private static class ButtonHandler implements ActionListener
    public void actionPerformed(ActionEvent event)
    char charEntered; // Holds the character entered
    String whichButton; // Button's name
    // Get the right button
    charEntered = inputField.getText();
    whichButton = event.getActionCommand;
    // If-Else procedures, to determine which button is pressed and what action to perform
    if (whichButton.equals("ok"))
    if (charEntered.equals("A"))
    outputLabel.setText("Your digit is 2");
    else if (charEntered == D || E || F)
    outputLabel.setText("Your digit is 3");
    else if (charEntered == G || H || I)
    outputLabel.setText("Your digit is 4");
    else if (charEntered == J || K || L)
    outputLabel.setText("Your digit is 5");
    else if (charEntered == M || N || O)
    outputLabel.setText("Your digit is 6");
    else if (charEntered == P || R || S)
    outputLabel.setText("Your digit is 7");
    else if (charEntered == T || U || V)
    outputLabel.setText("Your digit is 8");
    else if (charEntered == W || X || Y)
    outputLabel.setText("Your digit is 9");
    else outputLabel.setText("An error occured.");
    private static class ButtonHandler2 implements ActionListener
    public void actionPerformed(ActionEvent event)
    dFrame.dispose();
    System.exit(0);
    private static TextField inputField; // Input field
    private static Label outputLabel; // Output Label
    private static Frame dFrame; // Frame
    public static void main(String [] args)
    // Declare alphabetic listener
    ButtonHandler operation;
    ButtonHandler2 quitoperation;
    Label entryLabel; // Label for inputfield
    Label outputLabel_label; // Label for outputfield
    Button ok; // Ok Button
    Button quit; // quit button
    operation = new Buttonhandler();
    quitoperation = new ButtonHandler2();
    // New frame
    dFrame = new Frame();
    dFrame.setLayout(new GridLayout(4,2));
    entryLabel = new Label("Enter letter here");
    outputLabel_label = new Label("The result is");
    outputLabel = new Label("0");
    // Instantiate buttons
    ok = new Button("Ok");
    quit = new Button("Quit");
    // Name the button events
    ok.setActionCommand("ok");
    quit.setActionCommand("quit");
    // Register the button listeners
    ok.addActionListener(operation);
    quit.addActionListener(operation);
    // Add interface to the Frame
    dFrame.add(entryLabel);
    dFrame.add(inputField);
    dFrame.add(outputLabel_label);
    dFrame.add(outputLabel);
    dFrame.add(ok);
    dFrame.add(quit);
    dFrame.pack();
    dFrame.show();
    dFrame.addWindowListener(new WindowAdapter()
    public void windowClosing(WindowEvent event)
    dFrame.dispose();
    System.exit(0);
    I get these errors:
    fnatte:~/inda/java/chapter6>javac digit.java
    digit.java:23: incompatible types
    found : java.lang.String
    required: char
    charEntered = inputField.getText();
    ^
    digit.java:24: cannot resolve symbol
    symbol : variable getActionCommand
    location: class java.awt.event.ActionEvent
    whichButton = event.getActionCommand;
    ^
    digit.java:31: char cannot be dereferenced
    if (charEntered.equals("A"))
    ^
    digit.java:33: cannot resolve symbol
    symbol : variable D
    location: class digit.ButtonHandler
    else if (charEntered == D || E || F)
    ^
    digit.java:33: cannot resolve symbol
    symbol : variable E
    location: class digit.ButtonHandler
    else if (charEntered == D || E || F)
    ^
    digit.java:33: cannot resolve symbol
    symbol : variable F
    location: class digit.ButtonHandler
    else if (charEntered == D || E || F)
    ^
    digit.java:35: cannot resolve symbol
    symbol : variable G
    location: class digit.ButtonHandler
    else if (charEntered == G || H || I)
    ^
    digit.java:35: cannot resolve symbol
    symbol : variable H
    location: class digit.ButtonHandler
    else if (charEntered == G || H || I)
    ^
    digit.java:35: cannot resolve symbol
    symbol : variable I
    location: class digit.ButtonHandler
    else if (charEntered == G || H || I)
    ^
    digit.java:37: cannot resolve symbol
    symbol : variable J
    location: class digit.ButtonHandler
    else if (charEntered == J || K || L)
    ^
    digit.java:37: cannot resolve symbol
    symbol : variable K
    location: class digit.ButtonHandler
    else if (charEntered == J || K || L)
    ^
    digit.java:37: cannot resolve symbol
    symbol : variable L
    location: class digit.ButtonHandler
    else if (charEntered == J || K || L)
    ^
    digit.java:39: cannot resolve symbol
    symbol : variable M
    location: class digit.ButtonHandler
    else if (charEntered == M || N || O)
    ^
    digit.java:39: cannot resolve symbol
    symbol : variable N
    location: class digit.ButtonHandler
    else if (charEntered == M || N || O)
    ^
    digit.java:39: cannot resolve symbol
    symbol : variable O
    location: class digit.ButtonHandler
    else if (charEntered == M || N || O)
    ^
    digit.java:41: cannot resolve symbol
    symbol : variable P
    location: class digit.ButtonHandler
    else if (charEntered == P || R || S)
    ^
    digit.java:41: cannot resolve symbol
    symbol : variable R
    location: class digit.ButtonHandler
    else if (charEntered == P || R || S)
    ^
    digit.java:41: cannot resolve symbol
    symbol : variable S
    location: class digit.ButtonHandler
    else if (charEntered == P || R || S)
    ^
    digit.java:43: cannot resolve symbol
    symbol : variable T
    location: class digit.ButtonHandler
    else if (charEntered == T || U || V)
    ^
    digit.java:43: cannot resolve symbol
    symbol : variable U
    location: class digit.ButtonHandler
    else if (charEntered == T || U || V)
    ^
    digit.java:43: cannot resolve symbol
    symbol : variable V
    location: class digit.ButtonHandler
    else if (charEntered == T || U || V)
    ^
    digit.java:45: cannot resolve symbol
    symbol : variable W
    location: class digit.ButtonHandler
    else if (charEntered == W || X || Y)
    ^
    digit.java:45: cannot resolve symbol
    symbol : variable X
    location: class digit.ButtonHandler
    else if (charEntered == W || X || Y)
    ^
    digit.java:45: cannot resolve symbol
    symbol : variable Y
    location: class digit.ButtonHandler
    else if (charEntered == W || X || Y)
    ^
    digit.java:79: cannot resolve symbol
    symbol : class Buttonhandler
    location: class digit
    operation = new Buttonhandler();
    ^
    25 errors
    I don't get what's wrong... I know it's something with the "equals" method.. but I can't get a grip on it.

    Hi again,
    Thanks, I'm beginning to understand the structure... charAt(0) means take character at index 0, i.e the first character.
    I also understood how the || works, and I managed to compile the thing without errors. Now my code looks like this:
    import java.awt.*;
    import java.awt.event.*;
    public class digit
        // Define action listener for alphabetic buttons
        private static class ButtonHandler implements ActionListener
         public void actionPerformed(ActionEvent event)
         char  charEntered;    // Holds the character entered
         String whichButton;  // Button's name
         // Get the right button
         charEntered = inputField.getText().charAt(0);
         whichButton = event.getActionCommand();
         // If-Else procedures, to determine which button is pressed and what action to perform
         if (whichButton.equals("ok"))
              if (charEntered == 'A' || charEntered == 'B' || charEntered ==  'C')
             outputLabel.setText("Your digit is 2");
         else if (charEntered == 'D' || charEntered == 'E' || charEntered ==  'F')
             outputLabel.setText("Your digit is 3");
         else if (charEntered == 'G' || charEntered == 'H' || charEntered ==  'I')
             outputLabel.setText("Your digit is 4");
         else if (charEntered == 'J' || charEntered == 'K' || charEntered ==  'L')
             outputLabel.setText("Your digit is 5");
         else if (charEntered == 'M' || charEntered == 'N' || charEntered ==  'O')
             outputLabel.setText("Your digit is 6");
         else if (charEntered == 'P' || charEntered == 'R' || charEntered ==  'S')
             outputLabel.setText("Your digit is 7");
         else if (charEntered == 'T' || charEntered == 'U' || charEntered ==  'V')
             outputLabel.setText("Your digit is 8");
         else if (charEntered == 'W' || charEntered == 'X' || charEntered ==  'Y')
             outputLabel.setText("Your digit is 9");
         else outputLabel.setText("An error occured.");
    private static class ButtonHandler2 implements ActionListener
        public void actionPerformed(ActionEvent event)
         dFrame.dispose();
         System.exit(0);
    private static TextField inputField; // Input field
    private static Label outputLabel; // Output Label
    private static Frame dFrame; // Frame
    public static void main(String [] args)
        // Declare alphabetic listener
        ButtonHandler operation; 
        ButtonHandler2 quitOperation;
        Label entryLabel; // Label for inputfield
        Label outputLabel_label;  // Label for outputfield
        Button ok; // Ok Button
        Button quit; // quit button
        operation = new ButtonHandler();
        quitOperation = new ButtonHandler2();
        // New frame
        dFrame = new Frame();
        dFrame.setLayout(new GridLayout(4,2));
        entryLabel = new Label("Enter letter here");
        outputLabel_label = new Label("The result is");
        outputLabel = new Label("0");
        // Instantiate buttons
        ok = new Button("Ok");
        quit = new Button("Quit");
        // Name the button events
        ok.setActionCommand("ok");
        quit.setActionCommand("quit");
        // Register the button listeners
        ok.addActionListener(operation);
        quit.addActionListener(operation);
        // Add interface to the Frame
        dFrame.add(entryLabel);
        dFrame.add(inputField);
        dFrame.add(outputLabel_label);
        dFrame.add(outputLabel);
        dFrame.add(ok);
        dFrame.add(quit);
        dFrame.pack();
        dFrame.show();
        dFrame.addWindowListener(new WindowAdapter()
             public void windowClosing(WindowEvent event)
              dFrame.dispose();
              System.exit(0);
    }And I get this error while I'm trying to run it:
    fnatte:~/inda/java/chapter6>java digit
    Exception in thread "main" java.lang.NoSuchMethodError: main

  • What Is Wrong With My Program Help

    This Is The Assignment I Have To Do:
    Write a Java program that prints a table with a list of at least 5 students together with their grades earned (lab points, bonus points, and the total) in the format below.
    == Student Points ==
    Name Lab Bonus Total
    Joe 43 7 50
    William 50 8 58
    Mary Sue 39 10 49
    The requirements for the program are as follows:
    1.     Name the project StudentGrades.
    2.     Print the border on the top as illustrated (using the slash and backslash characters).
    3.     Use tab characters to get your columns aligned and you must use the + operator both for addition and string concatenation.
    4.     Make up your own student names and points -- the ones shown are just for illustration purposes. You need 5 names.
    This Is What I Have So Far:
    * Darron Jones
    * 4th Period
    * ID 2497430
    *I recieved help from the internet and the book
    *StudentGrades
      public class StudentGrades
         public static void main (String[] args )
    System.out.println("///////////////////\\\\\\\\\\\\\\\\\\");
    System.out.println("==          Student Points          ==");
    System.out.println("\\\\\\\\\\\\\\\\\\\///////////////////");
    System.out.println("                                      ");
    System.out.println("Name            Lab     Bonus   Total");
    System.out.println("----            ---     -----   -----");
    System.out.println("Dill             43      7       50");
    System.out.println("Josh             50      8       58");
    System.out.println("Rebbeca          39      10      49");When I Compile It Keeps Having An Error Thats Saying: "Illegal Escape Character" Whats Wrong With The Program Help Please

    This will work exactly as you want it to be....hope u like it
         public static void main(String[] args)
              // TODO Auto-generated method stub
              System.out.print("///////////////////");
              System.out.print("\\\\\\\\\\\\\\\\\\\\\\\\");
              System.out.println("\\\\\\\\\\\\\\");
              System.out.println("== Student Points ==");
              System.out.print("\\\\\\\\\\\\\\");
              System.out.print("\\\\\\\\\\\\");
              System.out.print("\\\\\\\\\\\\");
              System.out.print("///////////////////");
              System.out.println(" ");
              System.out.println("Name Lab Bonus Total");
              System.out.println("---- --- ----- -----");
              System.out.println("Dill 43 7 50");
              System.out.println("Josh 50 8 58");
              System.out.println("Rebbeca 39 10 49");
         }

  • What is wrong with this program segment? I could not understand the error..

    public class Hmw3
         public static char[] myMethod(char[]p1,int p2, char p3)
         {                             //13 th row
              if(p2<p1.length)
                   p1[p2]=p3;
                   System.out.println(p1);
         public static void main(String[] args)
              String sentence="It snows";
              char[] tmp=sentence.toCharArray();
              System.out.println(tmp);
              myMethod(tmp,3,'k');
              sentence=String.copyValueOf(tmp);
              System.out.println(sentence);     
    i wrote this program segment and compiler gave this error:
    C:\Program Files\Xinox Software\JCreator LE\MyProjects\hmw3\Hmw3.java:13: missing return statement
    What is wrong???

    Your method signature states that myMethod should return an array for chars.
    But in ur implementation of myMethod, there is nothing returned.
    Just add a return statement like "return p1"

  • What is wrong with this program it keeps telling me the file doesn't exist?

    this program is supposed to write the file so why does it need the file to already exist?
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.util.ArrayList;
    import java.util.Scanner;
    public class NewClass implements ActionListener{
        static List list = new List();
        static TextField input = new TextField(20);
        static Button submit = new Button("Submit");
        static Frame f = new Frame("RealmList editor");
        static File file = new File("/Applications/World of Warcraft/realmlist.wtf");
        static Label status = new Label("");
        static Button selected = new Button("Change to Selected");
        static File config = new File("/Applications/RealmLister/config.txt");
        static File dir = new File("/Applications/RealmLister/");
        public static void main(String[] args) {
            f.setLayout(new BorderLayout());
            f.add(list, BorderLayout.CENTER);
            Panel p = new Panel();
            p.add(input);
            p.add(submit);
            p.add(selected);
            f.add(p, BorderLayout.NORTH);
            f.add(status, BorderLayout.SOUTH);
            new NewClass();
            f.setSize(500,500);
            f.setVisible(true);
            try {
                loadConfig();
            } catch(Exception e) {}
            f.addWindowListener(new WindowAdapter() {
                public void windowClosing(WindowEvent we) {
                    try {
                      writeConfig();
                      System.exit(0);
                    } catch(Exception e) {
                       status.setText("Error: config couldn't be written!("+e+")");
        public NewClass() {
            submit.addActionListener(this);
            input.addKeyListener(new KeyAdapter() {
                public void keyPressed(KeyEvent e) {
                    if(e.getKeyCode() == KeyEvent.VK_ENTER) {
                    try {
                    editRealmlist(input.getText(), true);
                    input.setText("");
                 catch(Exception ex) {
                   status.setText("Error: "+e);
            selected.addActionListener(this);
        public void actionPerformed(ActionEvent e) {
            if(e.getSource() == submit) {
                try {
                    editRealmlist(input.getText(), true);
                    input.setText("");
                } catch(Exception ex) {
                   status.setText("Error: "+e);
                   wait(3000);
                   status.setText("");
            if(e.getSource() == selected) {
                try {
                    editRealmlist(list.getSelectedItem(),false);
                } catch(Exception ex) {
                    status.setText("Error: "+e);
                    wait(3000);
                    status.setText("");
        public static void loadConfig() throws Exception{
            if(config.exists()) {
                Scanner scan = new Scanner(config);
                ArrayList<String> al = new ArrayList<String>();
                while(scan.hasNext()) {
                    al.add(scan.nextLine());
                for(int i = 0; i < al.size(); i++) {
                    list.add(al.get(i));
        public static void writeConfig() throws Exception{
            FileWriter fw = new FileWriter(config);
            dir.mkdir();
            config.mkdirs();
            String temp = "";
            for(int i = 0; i < list.getItemCount(); i++) {
                temp += list.getItem(i)+"\n";
            fw.write(temp);
            fw.flush();
            System.gc();
        public static void editRealmlist(String realm, boolean addtoList) throws Exception{
            FileWriter fw = new FileWriter(file);
            fw.write("set realmlist "+realm+"\nset patchlist us.version.worldofwarcraft.com");
            fw.flush();
            status.setText("Editing RealmList.wtf Please Wait...");
            Thread.sleep(3000);
            status.setText("");
            System.gc();
            if(addtoList)
                list.add(realm);
        public void wait(int time) {
            try {
                Thread.sleep(time);
            catch(Exception e) {}
    }

    Erm, you should call mkdirs() on a File object that represents a directory.

  • HELP!! WHAT'S WRONG WITH MY PROGRAM?

    It prints out "Please input next string" twice the first time and I can't figure out why. Here's the code:
    import java.util.*;
    public class VowelCounter {
         public static void main(String[] args) {
              Scanner read = new Scanner(System.in);
              int elements=0;
              // create string array
              System.out.print("How many strings do you want?");
              try{
                   elements = read.nextInt();
              catch (InputMismatchException ime){
                   System.err.println("Invalid data type!");
                   System.exit(0);
              String[] testArray = new String[elements];
              // populate String array
              for (int i=0;i<testArray.length;i++){
                   System.out.println("Please input next string:\n"+i);
                   testArray=read.nextLine();
              } // end for
              // test array and print out result
              System.out.println(mostVowels(testArray)+ " has the most vowels.");
         } // end method main
         public static String mostVowels(String[] test){
              // create array to store count
              int[] numVowels = new int[test.length];
              // check all strings in array
              for (int i=0;i<test.length;i++){
                   test[i].toLowerCase();
                   // check each char in string
                   for (int j=0; j<test[i].length();j++){
                        switch (test[i].charAt(j)){
                        case 'a': case 'e':case 'i':case 'o':case 'u':
                             numVowels[i]++;
                             break;
                        } // end switch
                   } // end for
              } // end for
              // find string with most vowels
              int most=0;
              for(int i=0;i<numVowels.length-1;i++){
                   if (numVowels[i]<numVowels[i+1]){
                        most = i+1;
              }// end for
              return test[most];
    } // end class VowelCounter
    Thanks a lot!

    Hi,
    U can do this with BufferedReader.
    here is ur code
    //It prints out "Please input next string" twice the first time and I can't figure out why. Here's the code:
    import java.util.*;
    import java.io.*;
    public class VowelCounter {
         public static void main(String[] args) {
              BufferedReader bf= new BufferedReader(new InputStreamReader(System.in));
              Scanner read = new Scanner(System.in);
              int elements=0;
              // create string array
              System.out.print("How many strings do you want?");
              try{
                   //elements = read.nextInt();
                   elements = Integer.parseInt(bf.readLine());
              catch (Exception ime){
                   System.err.println("Invalid data type!");
                   System.exit(0);
              String[] testArray = new String[elements];
              int xyz =0;
              // populate String array
              for (int i=0;i<elements;i++){
                   System.out.println(i+". Please input next string:\n");
                   try {
                        testArray=bf.readLine();
                   }catch(Exception ek){}
              } // end for
              // test array and print out result
              System.out.println(mostVowels(testArray)+ " has the most vowels.");
         } // end method main
         public static String mostVowels(String[] test){
              // create array to store count
              int[] numVowels = new int[test.length];
              // check all strings in array
              for (int i=0;i<test.length;i++){
                   test[i].toLowerCase();
                   // check each char in string
                   for (int j=0; j<test[i].length();j++){
                        switch (test[i].charAt(j)){
                             case 'a': case 'e':case 'i':case 'o':case 'u':
                                                                                         numVowels[i]++;
                                                                                         break;
                        } // end switch
                   } // end for
              } // end for
              // find string with most vowels
              int most=0;
              for(int i=0;i<numVowels.length-1;i++){
                   if (numVowels[i]<numVowels[i+1]){
                        most = i+1;
              }// end for
              return test[most];
    } // end class VowelCounter
    Ganesh

Maybe you are looking for

  • General Reporting Issue

    Dear Experts, i need your advises for an issue regarding a reporting idea, i am working in Telecom company and as you know, there is alot of reports requested daily from END users, some of these reports can be moved to discoverer to let the users gen

  • OIM 11gR1: Disabled Resource changes to Provisioned on modification

    Version: OIM 11gR1 BP7 Target System: Active Directory using AD Connector 11.1.1.5.0 In my environment, I have a user with a disabled Active Directory resource. Whenever I make changes to the user's AD resource, the status of that resource is changed

  • Skip 'Review and Send' in leave approval

    Dear All I want to set the Skip review screen is true. Where I can do it in portal customization, please give your inputs.

  • Event Table won't work

    This is my tables and data: CREATE TABLE Client (Client_Code CHAR (4) PRIMARY KEY, Client_Name CHAR (15), Client_Address CHAR (20), Client_City CHAR (22), Client_State CHAR (2), Client_Zip CHAR (5), Client_Phone CHAR (10) ); CREATE TABLE Event (Event

  • FB60 Exchange rate user exits

    Hi Friends, I need the user exit for FB60 for the below scenario. I am creating the Incoming Invoices from FB60. Presently the Exchanges rate(0b08) are calculating the based on Posting date but i need this to be calculated based on Invoice date. Plea