Added UBB "CODE" tags to preserve indentation. And please note the policy about names. [This message has been edited by Frank Carver (edited October 24, 2000).]
I' m writing a program that takes input from a teriminal window. The program use textbased menus. Eks. M e n u ------- 1. Show status 2. Edit ...... 3. Delete ...... 4. Exit program Choice: 1 How can I avoid to hit "Enter" each time a selection is made? - new programmer
public class isItHundred { public static void main ( String[] args ) { double sum = 0 ; for( int i = 0 ; i < 1000 ; i++ ) { sum += 0.1 ;
} System.out.println( String.valueOf( sum ) ) ; } } When I run and compile this code, I get this output: 99.9999999999986 I expected 100.0 What is wrong with my code ? I using Sun's jdk 1.3 on a window 98 system. -newbie programmer :confused
If I use very long variable identifiers. Will this in any way "slow" down my programs? I.E.: String aVeryVeryVeryVeryLongIdentifier =new String("very long"); Has the access modifier any impact on my programs "speed" and performance? -Newbie Programmer
If I use very long variable identifiers. Will this in any way "slow" down my programs? I.E.: String aVeryVeryVeryVeryLongIdentifier =new String("very long"); Has the access modifier any impact on my programs "speed" and performance? -Newbie Programmer