32,204 Topics
| |
Help. I've been tasked with writing a program that calculates the average temp for a week, getting user input for daily temps, calculating the average and printing out the results. I got that part. The second part is asking me to print out a message (Too hot!) if the avg … | |
` This is the code /*Practice Assessment 2 - Question 5 Program to calculate how many days and weeks in a given month 24/2/15*/ import java.util.*; public class calender { public static void main (String []args) { Scanner keyboardIn = new Scanner (System.in); String month; int days_in_month, weeks, days; System.out.print … | |
| I would like code to display ms access database dynamically in a jframe . here is my database.**[img]http://i.imgur.com/PtuGLnX.png?1[/img]**.I tried searching a lot but i think i need personal help in this area as this is a suppose to be dynamically updated Jframe.on the other hand i am open to suggestion … |
i want to record voice then play it at the same time but when i use the below code i got delay and echo of the voice and some noise i will be grateful for any help int bufferSize = AudioRecord.getMinBufferSize(frequency, channelConfiguration, audioEncoding); AudioRecord audioRecord = new AudioRecord( MediaRecorder.AudioSource.MIC, frequency, … | |
Hello Fello Programmers out there; I have been trying to build ajava app from net bean 8.0 and Jdk 1.8, An app that has a data base connection so that data can be worked with, it also has images. The problem is that i can get a jar that is … | |
I want to remove the first line in jtextpane and setting setContentType("text/html") at the same time. setContentType("text/html"); Element root = getDocument().getDefaultRootElement(); Element firstLine = root.getElement(0); getDocument().remove(firstLine.getStartOffset(), firstLine.getEndOffset()); When I use setContentType("text/html") in the code it does not remove the first line. | |
int e=0; int Compatability=0; int numOfDisagreements=0; int tsize=likes.size()+dislikes.size(); int numOfCommonLikes=0; int numOfCommonDislikes=0; if (user.likes.get(e).equals(Stranger.likes.get(e))){ if ((Stranger.howDoYouLike(likes.get(e)))== 1 && user.howDoYouLike(likes.get(e))==1) { numOfCommonLikes=numOfCommonLikes+1; } } else if (user.dislikes.get(e).equals(Stranger.dislikes.get(e))){ if ((Stranger.howDoYouLike(dislikes.get(e)))== -1 && user.howDoYouLike(likes.get(e))==-1) { numOfCommonDislikes=numOfCommonDislikes+1; } else { numOfDisagreements=numOfDisagreements+1; } e++ ; } Compatability=(numOfCommonLikes+ numOfCommonDislikes)- numOfDisagreements; return Compatability; } Am getting a … | |
what is correct solution in Inheritance ???? I am new to genetics in Java and I want to resolve this question I look at the question existing attachments please and what is the correct dissolved and thank you very much | |
this is my latest class assignment, i would really appreciate some assistence with my pseudo code to help me in the right direction. my code skeleton is provided at the end of this post. Deque A double-ended queue, often abbreviated deque and pronounced deck, is an object with the following … | |
Yo, I'm a first year Computer Science college student, I've been thinking of pursuing a career as a Game Programmer. I was wondering since the only languages we are learning at the moment are Java and SQL, how useful is Java for developing games. Should I self-teach other languages like … | |
| I have created the following button: <form method="post" action="website.sup"> <input type="submit" id="btn1" name="btn1"/> </form> I am trying to call a ".java" file when i press this button. Sample of my .java code : package website; import javax.swing.* public class sup implements Runnable{... How do i call my java file? Additional … |
Greetings, I'm having problems with my output. Essentially I am just trying to print out any Cat who is over 3 years old and has Claws. But my output keeps printing out either nothing at all or the 3rd cat 3 times. I've struggled with this for hours trying to … | |
Hello Guys, I'm having trouble getting my code to run correctly. I need the program to ask the user do they want to continue after they guess the number correctly. If they say "y" the loop should restart if they reply "n" the program should end and close. I will … | |
Hi I am trying to connect to a server, to transfer a file. I have added remote to the known host file of source server and generated public key. From terminal i am able to login to remote server without password, but here through java , i am getting below … | |
trying to get the maximum location in my matrix of 4 columns and 3 rows. can anyone help point me in the right direction import java.util.*; public class Program3{ public static void main(String[] args){ double [][] m = createArray(); double [] colsum= new double [m[0].length]; for(int i=0;i<m[0].length;i++) colsum[i]= sum(m,i); printResult(m, … | |
I'm new with java programming so I'm sorry if my question is a lazy one. I'm working on a project that consists on collecting job offers from the web. So as a first step, I want to extract data (job offer data) from a specific webpage. So I want to … | |
How do I edit jasper report at runtime? means i have to edit previously created jasper report properties like page height,width,show and hide some fields | |
please some one help me send for me the codes for programme that helps in compueting the marks of stusednts by finding out their average total marks position in class and also tell if one is able to go to the next class with in a short time for a … | |
how i can write java programme like this out put Enter the number of minutes:*1000000000* 1000000000 minutes is approximately 1902 years and 214 days | |
Hi All, I have an online screen in which a form filed is filled with Numeric Characters .. if the entered four digits are not numeric, it will throw an alert message saying "**Only numerics allowed**". Now the new requirement is it should accept alphanumeric characeters instead of Numeric Characters. … | |
Modify the previous program to read in a list of floating-point values. The end of the input is indicated by the user entering a sentinel value -999. The program will display the following: the average of the values, the largest of the values, The smallest of the values, the range, … | |
I'm still a noob in JavaFX, I can print the content of the table that I query, the problem is that I want the content to be placed inside the tableview. This is the code that I have done. public class TableViewController implements Initializable{ @FXML private TableView<studentInfo> tblViewer = new … | |
Dear all, I am using linux fedora os. But i cannot able to set the java Classpath command. Step 1: whereis java java: /usr/bin/java /etc/java /usr/lib/java /usr/share/java /usr/share/man/man1/java.1.gz Step 2: vi .bash_profile export JAVA_HOME=/usr/bin/java export PATH=$PATH:/usr/bin/java Step 3: java -version java version "1.6.0" OpenJDK Runtime Environment (build 1.6.0-b09) OpenJDK Server … | |
Write a program that reads a word and prints the number of syllables in the word. For this exercise, assume that the syllables are determined as follows: Each sequence of adjacent vowels a, e, i, o, u, y, except for the last e in a word, is a syllable. However, … | |
hi guys I am practicing a java program and it goes like this. I am trying to this as a practice JAVA Object-Oriented program for a rental car company to create an inventory file(.txt) as a random access file which can easily be updated by users for the following specifications: … | |
hi all, i want to convert array of short to array of bytes in order to send it in Datagram Packet and then convert it from bytes to short | |
hi guys havent been here for a while, but I have a question for you all. 1. how do you write a java object-oriented program 2. is it the same as a java program or different 3. does it have any similarities between both program | |
I am having trouble writing the below java application. Here is what i am trying to accomplish Write a Java program that prompts a user to enter demographic information including year of birth (values 1900-2014), month of birth (values 1-12), day (value of 1-31) of birth, latitude and longitude of … | |
GregorianCalendar cal = new GregorianCalendar(year, month, 1); nod = cal.getActualMaximum(GregorianCalendar.DAY_OF_MONTH); som = cal.get(GregorianCalendar.DAY_OF_WEEK); for (int i=1; i<=nod; i++){// plz explain this line int row = new Integer((i+som-2)/7); // plz explain this line. int column = (i+som-2)%7;// also this line. mtblCalendar.setValueAt(i, row, column); | |
| So a lot of threads begin by some noob coming along and asking is c++ or c or java going to die and almost certainly, the answer, all have stood the test of time and this is simply panic nonsense spread by the spin doctors. http://www.infoworld.com/article/2613404/java/how-to-kill-java-dead--dead--dead.html But then it got … |
The End.