Java Definition and 572 Threads
-
S
Java Java Help with Methods: Solve Your Method Struggles
I am having a difficult time with methods in java. I've been able to get my program to run correctly without methods. My for loop does as intended by printing an alternating rectangular pattern with no separator at the ends. However, after trying to decompose my code into 3 methods I've hit a...- smilesofmiles
- Thread
- Java
- Replies: 2
- Forum: Programming and Computer Science
-
G
Java Almost all older useful (physics) java applets blocked
Hi. I have lots of bookmarks to splendid physics Java applets, but most of them are a bit dated. Many of them get blocked by current Java versions. To make them work I have to go to the Windows control panel, open Java control panel, add the page to the exception site list and restart the...- greypilgrim
- Thread
- Firefox Java Physics Security
- Replies: 4
- Forum: Programming and Computer Science
-
M
Comp Sci Java Programming Homework: Create Sandwich & TestSandwich Classes
Homework Statement I decided to take a Java class so I can introduce my students to programming/java next year as part of an after school program. I am stuck! My code works except for the last part. It is in bold. Honestly, I am lost. I'm sure it is a simple solution but I can't see it. Any...- momof4
- Thread
- Java Programming
- Replies: 2
- Forum: Engineering and Comp Sci Homework Help
-
J
Java A little clique "game" in Java - Clique Problem
For what it's worth, i created a little java program in relation to the clique problem https://en.wikipedia.org/wiki/Clique_problem The idea was, to play around with it and maybe discover some better algorithm than the known ones used to discover all maximum cliques The code is quite small...- Jeronimus
- Thread
- Game Java
- Replies: 2
- Forum: Programming and Computer Science
-
Java Java GUI Development: SWING vs. Other Libraries
Dear friends! Please explain me what API/Libraries uses in Java for create graphic user interface. I use SWING but I hear that SWING is oldest technology. What you uses?- levadny
- Thread
- Gui Java Libraries Swing
- Replies: 8
- Forum: Programming and Computer Science
-
Java Learn Java Programming: Fast and Comprehensive Tutorials
I was searching for a good website or an app that can teach Java.I found so many of them and they were pretty uninteresting.They don't teach from the scratch and I get so annoyed.And even in those videos that start from the scratch,it is very very slow that I feel why can't the teacher be...- Docscientist
- Thread
- Java Programming
- Replies: 3
- Forum: Programming and Computer Science
-
Java Multiple Inputs and Writing to .txt
Essentially, my problem is to: design a program that takes the following information: -a persons ID -a houses ID -listing price of house -selling price of house and write the input to a text file, called Sales.txt. Secondly, based on the list and selling price, commission is calculated based...- Euler2718
- Thread
- Java Multiple Writing
- Replies: 5
- Forum: Programming and Computer Science
-
V
Interested to learn Physics, But I don't know what to learn
I like to learn Physics related to my career. I'm a software Engineer with good development experience in Java. Looking to find ways how can I use Java with Physics- velraman
- Thread
- Java Physcis Physics
- Replies: 6
- Forum: STEM Academic Advising
-
T
Java Can compareTo Handle All String Comparisons in Java?
I can't get this to test all the way through import java.util.Scanner; public class OrderStrings { public static void main (String [] args) { String firstString; String secondString; firstString = "rabbits"; secondString = "capes"; if...- tbrown427
- Thread
- Java
- Replies: 1
- Forum: Programming and Computer Science
-
T
Java What are some open source projects for gaining experience with Java?
Hello everyone. I am a computer science and applied math double major. I want to get involved in an open source project so I can gain experience and so I have something to show potential employers that I worked on. I just created a GITHUB account and I am not an expert at using it, nor have I...- toothpaste666
- Thread
- Java Open source Projects Source
- Replies: 1
- Forum: Programming and Computer Science
-
D
Comp Sci [JAVA GUI] Counting the trajectory of a projectile not shown
Hello PFers, I'm trying to make a program in java which process user's position, initial velocity of the projectile and the elevation of the projectile and show the trajectory in GUI. The language is in java. The problem is, the trajectory won't show. It is supposed to show the player's...- demensia
- Thread
- Code Counting Gui Java Oop Programming Projectile Trajectory
- Replies: 2
- Forum: Engineering and Comp Sci Homework Help
-
V
Java Which Programming Language is Better for Web Development: PHP or Java?
Dear Friends, I am new here and I would like to ask you for an advise. I have the opportunity to start a scholarship with a good school with Cambridge International Certificate. At this school I have opportunity to choose one of two modules: PHP Web Development or Java Development. I worked...- vprohnitchi
- Thread
- Advise Java Php School
- Replies: 9
- Forum: Programming and Computer Science
-
Java Why is type casting different in Java and Python?
I am writing code in both Java and Python, and am a little confused about one thing: casting. In Python, we cast data types by using int(), str(), float(), etc. These are functions which convert one data type to its representation as another data type. However, in Java, it doesn't work like...- Mr Davis 97
- Thread
- casting java python
- Replies: 10
- Forum: Programming and Computer Science
-
N
Java Understanding basics of computer programming
I am having some issues understanding the fundamentals of Java and OOP. In simplest terms possible with an example can you explain to me what an Object, Class and Method are? I am confused on what these actually are. Thank you- Niaboc67
- Thread
- Basics Computer Computer programming Java Oop Programming
- Replies: 17
- Forum: Programming and Computer Science
-
O
Continuing Ed - Learn Java or Visual Basic
Hey all, So I just graduated community college with an associates degree. The program is essentially a chemical technician program. I'm currently employed at an agricultural company, but the job is not very mentally stimulating. I was thinking of pursuing a continuing education program...- Olie
- Thread
- Java Visual
- Replies: 1
- Forum: STEM Career Guidance
-
D
Java Java- Set hasDigit to true if the 3-character passCode contains a digit.
Been working this problem for hours and can't seem to get it right. Any assistance would be greatly appreciated! Note: Green colored text is the editable text public class CheckingPasscodes { public static void main (String [] args) { boolean hasDigit = false; String passCode =...- dellmac
- Thread
- Java Set
- Replies: 2
- Forum: Programming and Computer Science
-
N
Comp Sci Java Error: "Type Mismatch" Explained
I am programming in Eclipse and I keep seeing the error " Type mismatch: cannot convert from int to String", not only in the example I am going to provide but other programs. I've just started programming in Java. Could someone explain to me what this error exactly means? publicclassPracOne{...- Niaboc67
- Thread
- Error Java Programming
- Replies: 6
- Forum: Engineering and Comp Sci Homework Help
-
D
Java Java Programming Boolean if-else statement
Looking for some assistance with this. I've been messing with this for hours and can't seem to get it right. Some assistance would be greatly appreciated. What I have below is not correct. Material in green cannot be changed. Thanks!Print "Balloon" if isBalloon is true and isRed is false. Print...- dellmac
- Thread
- Java Programming
- Replies: 2
- Forum: Programming and Computer Science
-
Comp Sci Why does this method execute? JAVA
Homework Statement package myfirstgame; import javax.swing.JFrame; import java.awt.Graphics; /** * * @author danif */ public class MyFirstGame extends JFrame { public MyFirstGame() { setTitle("the game"); setSize(250,250); setResizable(false); setVisible(true)...- TheMathNoob
- Thread
- Java Method
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
N
Unable to get into Java based intro course, might CLEP?
I spoke with my adviser about this he said "have you ever programmed in Java before? because you could CLEP out into the following course" I told him I have programmed very little in Java. Now my life was a bit shattered when I realized the wait-lists for this class were too much to get in. So...- Niaboc67
- Thread
- Course Intro Java
- Replies: 2
- Forum: STEM Career Guidance
-
Java [Java] Make a musical note without using any external library
:oldsmile:Do you know how to make a musical note in Java without using any external library ? In C# I can simply do this : Console.Beep(50,1000); //play a sound at 50Herz of frequency within 1 second- Silicon Waffle
- Thread
- Java
- Replies: 6
- Forum: Programming and Computer Science
-
V
Comp Sci 2D collision detection / determining final velocity - Java
Homework Statement Determine if two circular objects (both moving or one stationary), collide and if so, determine their final velocity. The two objects are being rendered using Graphics's Java library class, updating their position 60 times per second. Their position (x,y) is determined based...- Vold
- Thread
- 2d 2d collision Collision Detection Final Final velocity Java Velocity
- Replies: 3
- Forum: Engineering and Comp Sci Homework Help
-
Java Defining variables in the context of implicit functions in java
Sorry for the disturbance, So I have been looking (without success) for a way to define a variable within an implicit function in Java. What I really mean by this is I have the equation: In this function my program will give me all of the values except for px. I have tried rearranging the...- Essence
- Thread
- Functions Implicit Java Variables
- Replies: 2
- Forum: Programming and Computer Science
-
Learning Java and C++ for Job Opportunities
Hi everyone... I'm a communication system engineering student and in my university we use studying Java. Now, for this summer, when I ll have free time, I was thinking about doing some practice with programming and maybe studying a new language, such C++( it s still a widesprrad language and I...- Domenico94
- Thread
- C++ Entry level Experience Java Job Job opportunities Programming
- Replies: 10
- Forum: STEM Career Guidance
-
Java Serialization/Deserialization of objects in Java
Ok guys, I am working on a simple serialize/deserialize project. A user interface takes the following input: A Department ID (INT), A Department Name (String), and Three Employees (ArrayList) that have a Name, Department, and Salary. Once the Three employees are entered, the Department can be...- iamjon.smith
- Thread
- java
- Replies: 4
- Forum: Programming and Computer Science
-
R
Junior Java Developer in Test: Interview Questions & SQL/Java Practices
I applied at an internship for the position of a Junior Java Developer in Test and I am wondering if you can provide me some screening question examples? The internship requires that I have strong knowledge in SQL and Java. I asked the recruiter to elaborate on the technical interview questions...- Robben
- Thread
- Developer Java Test
- Replies: 1
- Forum: STEM Career Guidance
-
O
Java Help coming up with a program idea
Hello, I have a working calculus library for java and want to use it in a program. I don't have very many ideas. I have limited Calc. II knowledge but a strong understanding of Calc. I. I have an intermediate understanding of java (took 3 courses at my high school of it), and a solid algebraic...- Obliv
- Thread
- Calculus Idea Java Physics Program
- Replies: 7
- Forum: Programming and Computer Science
-
P
Java Representing long decimals in hex in Java
Does anyone know how to represent the following (example) base 10 number as hexadecimal in the Java language...- Paul Uszak
- Thread
- Java
- Replies: 34
- Forum: Programming and Computer Science
-
P
Java Is secure deletion possible in Java
Let a file on disc comprise the bytes "Hello World". If I open the file in Java as a RandomAccessFile and write the character "X" over it from the start of the file to it's end, will the original disc block be overwritten? Or, will the original block containing "Hello World" be marked as...- Paul Uszak
- Thread
- Java
- Replies: 33
- Forum: Programming and Computer Science
-
D
Java Eigenword embeddings and spectral learning; I'm a beginner....
Hi everyone, I am a mathematics undergraduate and I'm currently doing an internship at the informatics department of a university. I am well and truly out of my depth. My supervisor has assigned me tasks which include Java (a language I'm having to quickly pick up, having only used python/R)...- dominique_
- Thread
- Beginner Java Linear algebra Pca
- Replies: 13
- Forum: Programming and Computer Science
-
R
Comp Sci Java Fibonacci Sequence: Finding the Sum of Even-Valued Terms Under 4 Million
Homework Statement Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be: 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ... By considering the terms in the Fibonacci sequence whose values do not exceed four million...- Robben
- Thread
- Java Sequence
- Replies: 11
- Forum: Engineering and Comp Sci Homework Help
-
S
Comp Sci Showing that matter has an atomic nature using Java program
Homework Statement http://pastebin.com/aS3vTR2V Homework Equations N/A The Attempt at a Solution I'm confused about what I need to do for the BlobFinder constructor. Someone told me that I should “initialize the ArrayList blobs”, then “create a 2D array of booleans called marked, having the...- s3a
- Thread
- Atomic Java Matter Nature Program
- Replies: 4
- Forum: Engineering and Comp Sci Homework Help
-
R
Java Junior Java Interview Questions -- What to Expect?
I am applying for a junior java internship and the recruiter told me there is going to be a math based interview question that I must code. What can I expect from this math based question? Are there general math questions that you can provide me so that I will have a good understanding of what...- Robben
- Thread
- Interview Java
- Replies: 10
- Forum: Programming and Computer Science
-
F
Java Solve Confused Java HW: Generate 225 Samples Size 625 Random Nos U(10,22)
Generate 225 samples of size 625 random numbers from U(10,22). For each of these 225 samples calculate the mean. a) Find the simulated probability that the mean is between 10 and 11. b) Find the mean of the means. c) Find the standard deviation of the means. d) Draw the histogram of the...- Frosty415
- Thread
- Code Confused Java
- Replies: 9
- Forum: Programming and Computer Science
-
T
Comp Sci How to Save and Sort a List of Historical Events in Java?
Homework Statement You are provided the following list that contains (semi-random) years from modern history. Save the list to a text file named “events.txt” Write a program that: 1. Reads in the file “events.txt” 2. Sorts it with the latest events first 3. Determines whether the founding of...- thatguy101
- Thread
- Arrays File Java Sorting
- Replies: 6
- Forum: Engineering and Comp Sci Homework Help
-
R
Comp Sci Java Implementing Singly Linked List
Homework Statement I am implementing a singly linked list but when I am in my main method, to add into my singly linked list, nothing happens.Homework Equations [/B] None The Attempt at a Solution I am trying to implement a singly linked list. My singly linked list, where I implemented a...- Robben
- Thread
- Java List
- Replies: 5
- Forum: Engineering and Comp Sci Homework Help
-
M
Java NullPointerException error in Java (Eclipse)
class Cellphone { private String brand; private long serialNumber; private double Price; public Cellphone (String br, long sN, double Pr) { brand= br; serialNumber = sN; Price = Pr; } public Cellphone(Cellphone aCellphone)...- MarcL
- Thread
- Eclipse Error Java
- Replies: 6
- Forum: Programming and Computer Science
-
R
Comp Sci Java: Set Interface Homework - Avoid Overriding Methods
Homework Statement If I have a subclass that implements a set class how can I avoid having to override all the set classes methods? Homework Equations None The Attempt at a Solution I have an interface: import java.util.Set; /** * An extended Set where there is added...- Robben
- Thread
- Interface Java Set
- Replies: 4
- Forum: Engineering and Comp Sci Homework Help
-
Java How do you handle multiple statements in Java's for loop?
Hello, I haven't used the for loop in Java much, so I have a question. How do you put multiple statements inside the initialization, condition, and iteration portions of the for loop? I was coding and I came across this error: Exception in thread "main" java.lang.Error: Unresolved compilation...- icecubebeast
- Thread
- Java Loop
- Replies: 2
- Forum: Programming and Computer Science
-
M
Java [Java] Did I write this program correctly? Please check
Write a Java program to find the sum of all numbers between 1 to 10. So we all know that 1+2+3+4+5+6+7+8+9+10=55 and that answer to this problem is 55. Please check my work below: public class Standard { public static void main(String[] args) { // Create a for...- Math10
- Thread
- Java Program
- Replies: 5
- Forum: Programming and Computer Science
-
R
Comp Sci How to Implement Union Method in Java Interface?
Homework Statement How do I take the union between an object called on and the object passed in the parameter? Homework Equations None The Attempt at a Solution I have an interface: import java.util.Set; /** * An extended Set where there is added functionality * *...- Robben
- Thread
- Java
- Replies: 5
- Forum: Engineering and Comp Sci Homework Help
-
T
Comp Sci 100 Lockers Problem Java Program
. Homework Statement A school has 100 lockers and 100 students. All lockers are closed on the first day of school. As the students enter, the first student, denoted S1, opens every locker. Then the second student, S2, begins with the second locker, denoted L2, and closes every other locker...- thatguy101
- Thread
- Java Program
- Replies: 16
- Forum: Engineering and Comp Sci Homework Help
-
R
Comp Sci How can I redefine the FileNotFoundException in Java for my class practice?
Homework Statement I want to redefine the FileNotFoundException by creating a new class which extends it, but I am having difficulty. For my class practice, if no file is selected or passed in, an UnknownFileException should occur. Homework Equations None The Attempt at a Solution My code...- Robben
- Thread
- Java
- Replies: 11
- Forum: Engineering and Comp Sci Homework Help
-
M
Java Help with a pattern using nested loops (java)
Hey so I have to make a pattern in the shape of a diamond as follow: 1 123 12345 123 1 So first, I wrote the code without using a variable n as the number of rows ( from an input from the user) but just the constant i = 5 ( I am sorry for the variable names, I made many patterns and...- MarcL
- Thread
- Java Loops
- Replies: 2
- Forum: Programming and Computer Science
-
R
Comp Sci Java: Reading a file into an array
Homework Statement How do I read in a file line by line into an array without using arraylist? Homework Equations NoneThe Attempt at a Solution I know how to do this using BufferedReader, but I am wondering how to do this using Scanner? When I used BufferedReader I noticed that there must...- Robben
- Thread
- Array File Java Reading
- Replies: 10
- Forum: Engineering and Comp Sci Homework Help
-
R
Java How to Incorporate a Numerical Solution into a Physics Java Applet?
Homework Statement [/B] I would like to make a physics applet. I have a numerical solution of the Lotka-Volterra model located here: https://www.physicsforums.com/threads/lotka-volterra-model-eulers-method.803382/#post-5044961 Homework Equations None The Attempt at a Solution [/B] I want...- Robben
- Thread
- Java Physics
- Replies: 8
- Forum: Programming and Computer Science
-
Java Why Are Java Applets Blocked Despite Being Added to Exception List?
I am trying to view some possibly old java applets on this site: http://aleph0.clarku.edu/~djoyce/java/elements/bookI/bookI.html I keep getting promoted that they are blocked. I have tried to add this site to the exception list but it has not changed anything. I closed all pages, and have since...- SmokeyMTNJim
- Thread
- java
- Replies: 3
- Forum: Programming and Computer Science
-
R
Java How do I create an instance of a class in a method using Java?
Homework Statement How do I create an instance of a class in a method? Homework Equations None The Attempt at a Solution I am a bit rusty whenever I think of instances. I always think of main method and objects when I see instance which gets me confused on what to do with the following...- Robben
- Thread
- Class Java Method
- Replies: 3
- Forum: Programming and Computer Science
-
R
Comp Sci Java Subclass Method for Cashier and Clerk: Solving a Competition Challenge
Homework Statement Suppose I have a subclass called, Cashier, and a super class named, Clerk. How do I make a method that is called on a Cashier object and takes in an instance of Cashier? What method has a structure like this? Homework Equations NoneThe Attempt at a Solution This method is...- Robben
- Thread
- Java Method
- Replies: 11
- Forum: Engineering and Comp Sci Homework Help
-
M
Virtual Solar System (formula for gravity in 3d)
I've made a virtual solar system in Java3d. I'm trying to implement the orbiting of planets and ships. I get the basic formula F = G((m1*m2)/r^2))[\code] and saw a discussion here about the formula in 3d but, I don't know how to read a letter with an arrow over it, lol. Can someone help me...- Mipada
- Thread
- 3d Gravity Java Solar Solar system System Virtual
- Replies: 1
- Forum: Astronomy and Astrophysics