Java Definition and 572 Threads

  1. J

    Java Java Coin Counter Program: Counting Change with Syntax Errors Help

    Hi. I'm completely new to Java, but I'm taking a course at a local university. I was wondering if someone could help me with this. I need to create a program that counts change (pennies, nickels, dimes, quarters). I've only been taking the class for about a week and am still very...
  2. A

    Java Learn Java Programming | Get Help Here

    Can anyone help me with a site where I can learn java programming language? I really need it, I'd be very grateful
  3. M

    Is Intro to Java difficult without programing experience?

    I was wondering if I would be able to handle Intro to Java if I go in without any programing experience. I have experience in Calculus up to vector calculus and differential equations, electricity and magnetism physics course, but no programming. You guys think I can handle it?
  4. M

    Courses Should I Take a Java Course to Boost My Career Prospects?

    Hello everyone. I was wondering if anyone has any suggestions. Well I should be graduating this spring if every went to plan. But of course it didn't. I started going to school in 2003 as a Software Engineering major, got hurt took a year off for recovery, went back to school as a computer...
  5. Y

    Java How to get Color from RGB value in JAVA

    Is there any way to get color from RGB value? for example If I give some random RGB value like r=221 g=255 b=123 then how do I get the color associated this RGB value? Thanks in advance.
  6. C

    Java Debugging Java Code for User Input Decryption

    Here's what I wrote , but there's no output.. It is suppose to read a line typed from the user and enter whatever the input was with the letter after the ones inputted. please help import java.util.Scanner; class ProblemS2 { static Scanner sc=new Scanner(System.in); public static...
  7. M

    Java How do you terminate a Java program?

    I have a window here and I want it to close the whole program when the user clicks on File>>>Close. I just need to know waht to put inside the method to close the program. I mean, how do you terminate the program in java?
  8. G

    Java RoboJDE & Java Project: Smoothing Robot Motion

    Hey, I'm working on a project with RoboJDE and java and I have a few quick questions. What I'm supposed to do is write code so that the camera will find the coordinates of a swatch of color and move accordingly as the swatch changes positions. The robot is supposed to move from side to side...
  9. M

    Java Transforming Infix to Postfix in Java: Solving Arithmetic Expressions with RPN

    I am creating a class that will transform a basic arithmetic expression from infix to postfix (Reverse Polish Notation (RPN)). Then after then, it will evaluate the postfix expression and give the answer. I have having a little trouble with the operators (+,-,/,0*, and %). Like, I have to...
  10. M

    Java C or Java for Seismology Equipment: What's Best

    I may be taking control of the running of some seismology equipment, which is run via C code. I know very very little about C code. Would it be better for me to spend the time to thoughroughly learn C, or could it be possible for me to convert the software to Java. I have a pretty god...
  11. S

    Java Build a GUI for Integer Input with Average and Clear Buttons - Java Help

    Build a GUI to accept integers (when the ENTER key is depressed) into an arr ay of 15 int; have a button called AVERAGE; when AVERAGE is selected, there is a display of the count and the current average; have a button called CLEA R; when CLEAR is selected, count is set to 0 and so are all...
  12. D

    Java Java Homework- Random Insult Generator (outline of code inside)

    Hey I'm new to this java stuff, I am taking my first class in it at the university of pittsburgh, and for my homework I need to write code to make a thing that will generate 10 random insults from a list of words. I have this outline to it and I was wondering if someone could help me fill in the...
  13. B

    Java Sending Java Files by Email: ZIP to Compile & Run

    I have to put a bunch of Java files (written in jGrasp) into one zipped folder and send it by email. The problem is that all programs work perfectly well when they are in an unzipped folder, but, when I convert folder into a ziped one, programs don't work. For example, I have user defined class...
  14. N

    Java How can I use ArrayList to count the characters in multiple lines?

    Hello. I am writing a program, but I can't figure out how to do something. I want to do something like this: Sample input: abcdeft 01234567 asfgSample output: The length of line 1 is: 6 The length of line 2 is: 7 The length of line 3 is: 3
  15. M

    Java Checking for Prime Digits in a Number

    How come when I exectue this program, I get the follwing error. Just to let you know, what i am trying to do is, check if ever digit in a number is a prime number. import java.lang.Math; public class PrimeNumbers { public static void main (String[] args) { int[] test = {546513, 77777...
  16. M

    Java Should I Use Streams or Readers/Writers to Copy a Text File?

    Please, I am in desprate need of soemoen that knows java. I need to turn in an assigment in 2 hours and I am trying to figure out something that I don't udnerstad. We are currently doing input and output stuff. I am trying to figure out how to count the numerb of lines, words, and chars in a...
  17. M

    Java Java Program to Find Smallest Integer with Same Last 5 Digits as its 7th Power

    I have built a program to answer the follwoing question. What is the smallest integer x >2006, such that x^7 and x terminate in the same five digits. The answer I get is 75800. But when I punch in 75800 in the calculator, for some reason, the last 5 digits for this number and 75800^7 are...
  18. N

    Java Java program that asks a customer of a store to type in their name

    Hello. I have an assignment that asks me to create a program that asks a customer of a store to type in their name, and an amount of money they spent. Then the program calculates a dicount they get according to the amount of money they spend. And print the discount to the screen. But it...
  19. J

    Java Plotting Functions in Java: A Pain in the Neck

    In programming in Java I've frequently wanted to plot functions, meaning I've had to convert a double array of function values (and a corresponding array of their domain values) to integer arrays of coordinates to plot. I've always found this to be a pain in the neck, especially if you're trying...
  20. H

    Java Java Numeric Computing: Performance Discussion

    the purpose of this thread is to be a placeholder for discussion about the performance of Java in Numerical Computations. Started as a discussion between CRGreathouse and me about weather or not Java can be used effectively in doing computations. The plan we have: Phase 1: Solve a...
  21. 0

    Java Setting the java.library.path property for LWJGL (Java)

    I would like to be able to detect a click anywhere on the screen, not associated with any particular screen component, and in fact inside another program's window. I don't know if I can use the listener framework to do that--if I can, I don't understand how. Can I get a whole screen object to...
  22. 0

    Comp Sci Java indexOf() Method: Finding Elements in a Set

    In Java, I am looking for a collection that will test if a given element is in a set, using the equal() method defined for the element. If it is in the set, I need the collection to give me the actual occurrence of the object from the set. Vector will do this for me via the indexOf() method...
  23. D

    Java Creating a Movie of My Java Animation: Flying Ball

    I have a java animation- a ball flying up and down. Please help me to turn it into a movie because I want to see how it is played in winmedia player
  24. L

    Comp Sci Help with Counting Objects Created in a Java Class

    I have only 1 day to work on my lab. Hope someone could help me as soon as possible. My problem is I don't know how to count how many objects are created in a class. The first assignment is write a Java class, Student, that has the following instance variables: name (String), age (int), gpa...
  25. C

    Java Java applet for Single/Double-slit Experiment?

    Greetings, Does anyone know a website with a java applet for a Single or Double-slit experiment? I'd like to mess around with the variables to learn the intricacies of how it works. Variables I'd like to mess with include: slit width slit thickness slit distance from screen incident...
  26. Y

    Java Finding a Method for Incremental Output in Java

    I was curious if anyone knows if there are any methods to do the following in java. I'm writing a terminal based program in java, and it will be doing incremental updates. I want to output to the terminal the percentage done, but to replace the last output. For example: $>java jprog...
  27. G01

    Java Counting Characters in a String with Java

    I need java to read a string and count how many characters are in it. I know there's some class that can do this. What is it?
  28. J

    Java I about data structures (trees) in java

    I'm trying to create this program that allows the user to create and manipulate trees. For example, a user might create a new tree with a node containing "words" as its data, then create nodes containing "nouns", "verbs", "adjectives", etc. as their data. The problem is I don't know how to...
  29. T

    Java Solve Java 1.5 Installation Issue on Ubuntu Linux

    I'm on ubuntu linux. I've installed java 1.5 but at the command line, when I type java -verion I get 1.4. So then I type: export PATH="/usr/lib/jdk1.5.0_06/bin/:$PATH". I type java -version and get 1.5, but then when i close the command prompt and open a new one, it's back to java 1.4. Any help...
  30. Q

    Java Is anyone good with fixing java errors? Need your help please

    I'm interested in learning foreign languages. I plan maybe to study japanese linquistics in college. I'm learning spanish and japanese, but more japanese for now. I signed up for a yahoo account on yahoo chat on video games, but I keep getting very strange errors and it won't let me type in...
  31. N

    Java Should I learn C and Java simultaniously?

    Hello all. I have never taken a programming class, but this next semester I am taking two. One teaches you Java, and the other is C. Will it be hard to learn both at the same time. I am very dettermined, and a very hard studier and hard worker. Has anyone else here learned two languages at...
  32. H

    Java Update Java Version to 5.0 - Instructions & Tips

    Hi, I just updated to 5.0 and changed the java version from the java preferences as instructed in the installation instructions. However, from the terminal if I type java -version it shows that the 1.4 is still the default. Can someone tell me how to set 5.0 as the default from the terminal...
  33. N

    Java Where I can find Java MIDP tutorial for free

    I want to lear Java MIDP which can allow us to create an mobile applications . Did anyone know where I can find the tutorial for free at the Internet ?
  34. B

    Java Converting Character Representation of Integer to Integer in Java

    :redface: Is there a way to convert a character representation of an integer into an integer (with integer representation :rolleyes:)? *for example (I'll add 8 to a certain digit in an integer), String nmbr; //where I enter a number int pst; //an integer representing the position of that...
  35. C

    Java Java Programming: Fixing Scanner Issues

    Java's "Scanner" Hello, I own a Macintosh and was trying to write a simple Java program for one of my classes. However, I quickly discovered that it appeared that the Mac does not have the Scanner ability. I get an error on the "import java.util.Scanner" line saying "cannot find symbol...
  36. E

    C/C++ Learning Python: Getting Started from Java and C++

    I want to start learning python. Lots of people I know say it's a very good language. Right now I know Java and a little bit of C++, but I'd like to experiment with some other languages, specifically Python. Right now I've got Python 2.4 installed on my PC, now I need to know what to do from...
  37. B

    Java Fixing "')' Expected" Error in Java: What Causes It?

    What does an " ')' expected " error signify? How did I not use parentheses correctly? The error is in this line: System.out.println(num1 + " " + num2 + " " + num 3 + " " + num4 + " " + num5) ; What possible mistake can there be in parentheses?
  38. H

    Java Test for equality simply by checking identity in JAVA

    I'm writing a program that likes to test for equality simply by checking identity: IOW, a.equals(b) iff a == b. Now, I think I would like to use HashMap's and stuff... so I would like to be able to use the appropriate accompanying hashCode method... that is, the default implementation of the...
  39. T

    Java Java Applets for visualizing math and physics

    http://www.falstad.com/mathphysics.html I cannot begin to estimate the love affair I will have with this site. This just seems like an invaluable tool for students, and anyone at all who is even passively interested in math and physics. (I apologize if it has already been mentioned...
  40. J

    Java 7 ways of declaring main in java

    hi, i know there are 7 ways to declare main in java as 1.public static void main(String args[]) 2.static public void main(String args[]) but what are the other ways? but only change first two keywords i.e. public and static and use the required keywords. this is the question...
  41. JasonJo

    Last Java programming questions

    Your task is to create a Java program with the name that asks the user for 5 integers in the main method that are between 0 and 9, inclusive. You should then write a method called “permutations” which accepts these 5 integers and prints all possible permutations for those numbers. (Hint: You...
  42. A

    Java How can I download java applets from any website?

    Hello. please tell me how can I download java applet in my computer from any website. thanks
  43. JasonJo

    Computer Science Java Programming Help

    Computer Science Java Programming Help! Determine whether or not an integer given by the user is a prime number. You may assume that the number is greater than or equal to 2. You may conditions that are in the form “if x is divisible by y” when writing your algorithm. HINT: One way of...
  44. F

    Java Java Text Analysis Script: Count Word Frequency & Sentences | Get Help Now"

    hello everyone, thanks for taking ur time reading this po i need help with something to do with java, designing an application to read sentences & words from a txt file, and create a new txt file, with all the words (in single) from the original txt file, next to each word, containing the...
  45. J

    Java Java Credit Card Payment Calculator with For Loop

    Hey I hava a java programming assignment for my intro to java class... I've written my program but I don't know how to make the "new balance" my balance for the second time it runs and so on.. Q)Save the programs as ccard1. Take a credit card balance of $500. Calculate the 5 months the...
  46. N

    Java Why aren't my images appearing in my Java application?

    Hi, I'm working through the "Building an Application: Part 2: Introduction to Inheritance, Panels, and Layouts" on java.sun.com and the code I've written compiles fine, but the images that are supposed to appear in the JPanel aren't there. jl = new JLabel("Java Technology Dive Log", new...
  47. JasonRox

    Java Troubleshooting Java: "javac" Command Not Recognized

    Alright, I did the whole Hello World! thing, but I got stuck on one part. I downloaded the Sun.Java thing, but now when I go into the command prompt and to try and compile it... the computer does not recognize the "javac" command. What's going on? Is there another program?
  48. mattmns

    Java My school seems to mainly teach java

    Next semester I plan on taking a comp science class, and my school seems to mainly teach java. I always considered the standard language to be c++, I think it was a few years ago here, but I guess they recently switched over. My questions are: Are there any major differences...
  49. B

    Java Selection Sorting Arrays in Java

    So, I have to create a program that makes a new array with 20 slots, then it asks you to enter a value into each index, which I have here: import java.io.*; class ArrayLoop { public static void main (String[] args) throws IOException { int[] array = new int[20]; for (int i...
  50. dduardo

    Java Why Choose Java Over Python, Perl, or PHP for Enterprise Web Development?

    In terms of enterprise web development why would you choose Java over Python/Perl/PHP? I ask this question because I've done significant web development with both Python and PHP and have recently been dabbling with jboss/tomcat/j2ee and have found that Java is very cumbersome. Not only is it a...
Back
Top