32,204 Topics
| |
see this images what is incorrect in this examples ....... | |
Guys visit this site and please let me know what are the disadvantages of this website ....i am the new user..... **www.bjavaexpert.com** | |
I had a programme to write for college in Java. I have missed the class so I won't be getting marked on it but wanted to get it done as I have an exam next we. I am really stuck. I have to create a costInsurance () method taking in … | |
Hi All, I came across this question in Cathy Siera SCJP book and the answer is really Strange and i dont understand. The question is below. class A { } class B extends A { } public class Comingthru { static String s ="-"; public static void main(String[] args) { … | |
Having issues with array. Seems to pull in the enum files (month and average rainfall) and print accordingly. Also seems to read in the updated rainfall per month. However, problem is I can not make updated print with the enum. Also, last line in program has ..."actual[i]". If use a … | |
how do i change the background to a custom one. code JButton button = new JButton(); JButton quit = new JButton(); public Mainmenu() { Icon b = new ImageIcon(getClass().getResource("play.jpg")); play = new JButton(playb); add(button,BorderLayout.CENTER); Icon quitb = new ImageIcon(getClass().getResource("quit.jpg")); quit = new JButton(quitb); add(quit,BorderLayout.SOUTH); button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent … | |
I just started learning Java and I have been playing around with it. I am trying to make this program return a double value like 1000/3 = 333.33333..... but it returns 333.000 what am I doing wrong in Java. It works in C though :P. Thanks in Advance! //Exercise : … | |
public class arraChange { public static void main(String []args){ int arr [] = {2,3,4,5,6,7,8}; public class arrayCounter { public static void main(String args []){ Random rand = new Random(); int freq[] = new int [7]; considering the above two seperate lines of codes, i just want people to explain to … | |
please help me how to close the window. code: JButton quit = new JButton(); public Mainmenu() { setLayout(new FlowLayout()); Icon quitb = new ImageIcon(getClass().getResource("quit.jpg")); quit = new JButton(quitb); add(quit); quit.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { } }); | |
I need to get printed documents name and from which ip it is printed using java. | |
I am trying to develop the genetic algorithm to solve Traveling Saleman problem and part of my challenge is to generate random tours long enough and write a fitness function to evaluate the cost incurred for each of the random tour. I have attempted to write the following. My objective … | |
For example, How do I use this custom print method to display something in the main method? public static void print(Stack<String> myStack ) { int count = 1, sizeOfStack = myStack.size(); System.out.println("\nYour stack has size: " + myStack.size()); for (String myString : myStack) {System.out.print(count + ". " + myString); if(count!=sizeOfStack) … | |
Hi Dw I've recently created an application in java on this post:www.daniweb.com/software-development/java/threads/458306/how-to-work-with-jpos and now I just want to improve this by enabling a feature of mixing the cash notes when dispensing the required amount. The machine has these bills notes: 10, 20, 50, 100, and 200 so now what I … | |
I'm writing this code for one of my projects. can you please help me with line #6,#7 and #10? I'm not sure if I am writing the code for those correctly. package waffles; import java.util.Scanner; import java.util.Stack; /** * */ public class Waffles { /** * @param args the command … | |
package die.java; import java.util.Random; class DieGame2 { private final int sides; private final Random generator = new Random(); public DieGame2(int s) { sides = s; } public boolean throwDie() { int faceValue = generator.nextInt(sides) + 1; System.out.print(faceValue); return faceValue == 6; } public static void main(String[] args) { DieGame die1 … | |
Hi, Is there any java functions are availble to find mostly repeated characters in string ? Thanks | |
Hi. I am very new to hashtable concept. Here is a skeleton of the methods I need to implement; BUT, my biggest question is the inner Entry class. Am I implementing the entry class correctly?Is my constructor correct? Thanks public class HashTable<K, V> { /** define an inner class to … | |
Hello everybody i have a little problem with making a java command for program i have some code but i do not know how to continue i stuck in one place BTW the command i want to make is > /sendcash [username] [money] // how it looks like I have … | |
Basically I've created an **app drawer** and placed a **seekbar** within it. This app drawer is made up from **app_drawer.xml** whilst my fragment below is made up from **main_activity.xml**. The issue I'm having is, although the seekbar shows up perfectly and the app drawer pulls in and out as it … | |
I a software engineering student who took a Java course last semseter.But currenlty I'm self-studying Java for expanding my Java knowledge.The problem is that Java is a very vast programming language and I'm confused where to head next. I would say I'm on the intermediate level with regards to Java; … | |
Trtying to figure out how to add 5 different methods into this class when the program already does all that is required but my prof will knock me if I dont put them in here, do thet need to be put in as private? | |
i need good java eclipse tutorial iv'e watched theCherno,Thenewboston etc.i learned GUI,anonymousclass etc.i just need a good beginner tutorial on java eclipse. | |
Hello. I am working on this project and it asks me to make two columns of words that are ascending in one column and descending in the other. This is the Project: Call both your project and class AscendDescend. The first column should be in ascending order and the second … | |
i want code of Sorting techniques like insertion sort , merge sort , bubble sort , quick sort. i want their output in gui or in any animation form in any language like c , c# or java. can any one help me plz ?Any one sorting technique is ok. | |
pls help me to build an applet form merge sort for our project | |
Hi, I am trying to read a html page and convert into xml and copy the content into a txt file in the local drive. The code below is to read the html page: def cleaner = new HtmlCleaner() def node = cleaner.clean(address) // Convert from HTML to XML def … | |
Hi Im new to learning java so far ive picked up the basics of it but now im trying to create a first and best fit algorithm for the purpose of memory managment now my question is what to i specifcally need to learn to be able to to this … | |
Hi, I'm trying to use the replace() method to take out all instances of " " , (space) with an underscore, ("_"). I'm doing this because I'm using URLs to connect to a servlet. I keep getting this error: [code] replace(char,char) in java.lang.String cannot be applied to (java.lang.String,java.lang.String) url.replace(" ", … |
The End.