32,204 Topics
| |
I am trying to get my method to return to the main. I have tried return statements but when i run it all it gives me is nothing. It just follows what the main method has but the other methods do not get to return to the main method so … | |
So, I am trying to test my if else with two Character.toUpperCase answers and I keep getting this error: 1 error found Error: bad operand types for binary operator '^' first type: char second type: boolean I tried && and & and it won't work. If I don't use anything … | |
I was following along to the following tutorial - [Derek Banas Java tutorial 18 - Threads pt2](http://www.youtube.com/watch?v=G2Xd5avyk_0) and as I decided to go over his tutorial series by following along in notepad++ and compiling with the command line, so that I can experiment and test things I'm unsure about, I … | |
Hi all I am writing a java program to display the dob of sportsperson, now I have use the java.util.Date to display the date on to the consloe. But since it is deprecated I wish to use some other method to get and display the date from the user. Here … | |
if input is given like (5,4,6,3) it returns 4,5,3,6 but i want it to return like 3,4,5,6....kindly help. import java.util.Scanner; public class sort { public static void main(String args[]) { int rows; int cols; Scanner input = new Scanner(System.in); System.out.println("Enter number of rows u want in matrix "); rows=input.nextInt(); System.out.println("Enter … | |
how to write code in java this statm if public String pass (){ b =txt_pass.getText(); if ("ameer".equals(b)) JOptionPane.showMessageDialog(null, "the password is correct"); return b; } how to make this **if (user ()) retrun a ** JOptionPane.showMessageDialog(null, "the password is correct"); | |
can any one explain about the below code which is Dining Philosophers Problem.. [CODE] //Dining Philosophers Problem import java.util.Random; class Monitor { int phil_States[] = new int[5]; // 0=not_waiting, 1=waiting // 2=eating boolean fork_States[] = new boolean[5]; // false = in use, true = free Monitor() { // constructor for(int … | |
Hi. I am making a program and I started at the first example for sphinx 4. I can't even run the program becouse I get an error:new ConfigurationManager(args [0]) so I can't even run the program. Please help. Here is my code: import java.net.URL; import com.sun.speech.freetts.Voice; import com.sun.speech.freetts.VoiceManager; import edu.cmu.sphinx.frontend.util.Microphone; … | |
how to reduce memory usage of java application...it takes 18 mb memory when started,when i starts new thread it takes 47 mb of memory .After i closed the started thread ,the memory is not reduced to 18 mb. It still stays at 47mb of memory usage. | |
I am getting a very mysterious bug when I run my java website in Browser Mode: IE9 Compatibility View - the sessions stop working and I have no idea why. I don't think there is a tag or any code that I can include in my website that can force … | |
import javax.swing.JOptionPane; public class Hotel626 extends javax.swing.JFrame { public Hotel626() { initComponents(); } @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { jLabel2 = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jProgressBar1 = new javax.swing.JProgressBar(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); setResizable(false); jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Pic/Entrace.jpg"))); // NOI18N jButton1.setBackground(new java.awt.Color(0, 0, … | |
ATM -Deposit -withdraw(5 times maximum per day) -maintaning balance 200 -maximum withrdaw 20,000 -Default Amount 50,000 help me :( | |
Hello everyone. I have created a class in Java named Farm which contains a list of animals(cow,pig and chick). myFarm is an array of object of Farm class containing objects of NamedCow,pig and chick class. I have not understand one line in my code: NamedCow named = (NamedCow)myFarm.get(0); here what … | |
I've recently become interested in trying to adapt my Rock-Paper-Scissors game into a multiplayer-friendly program, so today I decided I'd look up a tutorial on servers. It seems I'm following it precisely (aside from using a different IDE). However, something is going wrong and I'm not sure exactly what it … | |
Just wanted other opinions on my code and a way to figure out whether or not each number placed into the 2D array is unique. My mind is blanking out a bit, I placed something in the method before but erased it. Debating on whether the parameters should simply be … | |
Using the easysoft JDBC-ODBC bridge to connect to an Access DB. Has been working great since CF6. Currently no issues on CF9(solaris). We're working to upgrade our servers to CF10 on Redhat and have everything working except when we attemtp to verify our data sources that use this driver we … | |
i triyed to learnJava programming using netbeans, what kind of a book do you think i can use to be highly educated with programming in java | |
Hi all master is posible srcape a web java applet using curl php? please help | |
Dear All, I have an animal class and a thread class. Just to understamd the concept of Object lock in threads. I have used the Animal instance as a lock in my thread class. The program never ends. My question is is there a condition i can put before invoking … | |
Hello, I am writng a simple networking program with a single server and multiple clients. I would like to send and receive objects between the clients and the server and hence I use the ObjectOutputStream/writeObject(Object) and ObjectInputStream/readObject() combination. First, my server program: import java.net.*; import java.io.*; import java.awt.*; import java.awt.event.*; … | |
Is it possible to put a checkbox in the title bar of JInternalFrame? | |
What are some simple games that can be made using linked lists and only java? The simpler, the better | |
Since some of us might get a bit rusty with our coding, we constantly need projects to keep us busy, no matter how big or small. Making sure you code a little a day it not only fun but also allows your skills to continue growning. The problem though, is … | |
Hello, DaniWeb! Today I am in need of a Java Crash Course! Maybe a couple of (very short) source files with comments describing what things do? Any help is appriciated! I already know C++, how much does that help me? | |
Hey everyone, I am learning recursion in Java and I have a lab to do. I have done the first part right, which is to draw those squares. The second part of it is to do the reverse of it, so left starts from the smallest square to biggest. I … | |
I have the following list of Integers (0,1,2,3) Now I want to write a method which returns specific number of pairs from the list. So if I give it 5 as argument I will expect it to return the following: (0,1),(1,2),(2,3),(3,0),(0,1) So basically when it reaches the end element and … | |
My eclipse id is taking too long time to open (at least 15 minutes) I tryed all the options in google search but the problem remains the same kindly give me tips to fix the problem thanks for your time | |
// random number generator var theDecimal = 0; function newProblem(){ theDecimal = Math.floor(Math.random()*256); //math.floor chops off decimals and rounds document.getElementById("startNumber").innerHTML = theDecimal; } | |
As a beginner java learner, I would be grateful if some people could point out a few open source projects with a high quality code base. Not necceserily aimed at a beginner, I would rather see a professional quality example, and preferabbly the project would use some common tools for … | |
| I have already seen that someone posted this question a couple of years ago. I do not want any one to flat out give me the answer. I hav the code written, I just cannot figure out why the pattern won't look like this: 1 12 123 1234 12345 123456 … |
The End.