35,618 Topics

Member Avatar for
Member Avatar for gahhon

is possible to work of return statement with Math Class? eg, [CODE]return Math.pow(2,2);[/CODE]

Member Avatar for gahhon
0
149
Member Avatar for Dersev

Hello I have a problem how to make custom defined text area it's similar to text area which you can create in Photoshop while you wan't type any text. Is it possible to do it in swing ?

Member Avatar for JamesCherrill
0
126
Member Avatar for PHkiDz

Hello good day to all... is there anyone can help or suggest me how my code work successfully. Actually the code was working well, but i wanted to change it`s content to GUI form. the program description was the user must input a word/String and shuffle/scramble the word that the …

Member Avatar for JamesCherrill
0
235
Member Avatar for Mi_99

So my title was meant to be array not loop I need to create an application that will generate random spots so far my work is this [CODE]import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.util.*; import java.util.Random; public class Shape{ private int x; private int y; private int width; private …

Member Avatar for JamesCherrill
0
203
Member Avatar for woomichael

Okay so I have read the guidelines and don't believe this post is against the rules or against the rules for asking for help because I have put in an effort and I'm around 70 percent in testing the files. I just need help with this basic Java code to …

Member Avatar for Taywin
0
146
Member Avatar for sebseb678

This is the assignment: TIP CALCULATOR Create a class called TipCalculator which calculates a tip amount based on a grade of service received. calculateTip method Create a method named calculateTip which accepts two incoming parameters: a double and a String. The first parameter (the double) contains the bill total, and …

Member Avatar for NormR1
0
95
Member Avatar for drameshgar1

hy! i am designing game in JAVA as my university project, i want to make myself unique by doing something different ---soo i though of making iphone game that runs java...I designed the iphone app, which is just a icon and few other things...when u click nothing happens but i …

Member Avatar for drameshgar1
0
156
Member Avatar for funwidak

Hello, I have recently joined a orgainization as a [B]Java Engineer Trainee([/B]0 Years of Experience) and working on a project(80% ABAP people are working on project) in mainteance from last 2-3 Years. The Work in the project is of basically in ABAP and [B]Core Java[/B] (Only Basic Java code is …

Member Avatar for peter_budo
0
249
Member Avatar for alliswim2010

[COLOR="gray"][/COLOR]1. your-netid_hw5_1.java : Liang page 253, programming exercise 7.6. (Multiplying two matrices) Write a method to multiply two matrices. The header of the method is as follows: public static double[][] multiplyMatrix(double[][] a, double[][] b) To multiply matrix a by matrix b, the number of columns in a must be the …

Member Avatar for ~s.o.s~
0
727
Member Avatar for maverick420

[TEXT]I'm trying to write an application that will input five numbers from the user. The program should print out the largest and smallest numbers. It should print how many of the numbers are two digit and how many of the numbers are three digit. It should also print out the …

Member Avatar for peter_budo
0
254
Member Avatar for gahhon

as we know the code of scanner is like this, [CODE] ... Scanner scan = new Scanner(System.in); System.out.print("something is something: "); [COLOR="Red"][type] [variable name] = scan.next();[/COLOR]... [/CODE] so here is my problem, how can we scan char type?

Member Avatar for stevanity
0
90
Member Avatar for NormR1

Is there an easy to use tool that OPs could use to find variable's whose class level definitions are Shadowed by local definitions of variables with the same name. I see that problem a couple of times a week. Do the standard IDEs have options that would warn about the …

Member Avatar for ~s.o.s~
0
180
Member Avatar for Narayanan87

Hi, Am setting a value in request objet like this: [icode]request.setAtttribute("Hello","true");[/icode] Now i am redirecting to the action class: [icode]new RedirectingActionForward(request, url.getInwardRedirectURL());[/icode] In the redirected action class, am using this to retrieve value from request object: [icode]String example = request.getAttribute("hello").toString();[/icode] Am getting nullpointerexception.. Could anyone help me on this..!!

Member Avatar for stevanity
0
146
Member Avatar for anand01

Hi all, I am learning j2ee with the help of this forum . First thanks for all of your replies realy that makes me to know more things . Now i have doubt, i don't know whether it is silly or not . How does RequestDispatcher works? I know it …

Member Avatar for anand01
0
112
Member Avatar for anand01

hi everyone, Am doing project for profit and loss account,I need to display daily expediences in graph format for that am using jquery bar graph its working separately when i integrate its not working properly. i used the following code for forward .. [CODE] request.setAttribute("listvalue", list); RequestDispatcher dispatcher = request.getRequestDispatcher("/ViewProfitLoss.jsp"); …

Member Avatar for anand01
0
288
Member Avatar for J-Dub

I am trying to build an animation. It just has two pictures or scenes. I want it to start at one picture and end at another. When I run my project all I see is a blank screen. I have checked and made sure that my Image paths are correct. …

Member Avatar for J-Dub
0
191
Member Avatar for hessian26

Hi, I am new to Java and just learning GUI's. I was wondering if someone could help me with a project? I am trying to create a questionnaire. It will was the user a question and have radio button answers. After the answer is selected, they will hit the "next" …

Member Avatar for mKorbel
0
182
Member Avatar for ilovejava

An emirp (prime spelled backwards) is a prime number that results in a different prime when its digits are reversed.[1] This definition excludes the related palindromic primes. Emirps are also called reversible primes. this are the list of emirps [url]http://oeis.org/A006567/list[/url] [CODE] public class EmirpProgram { public static void main(String args[]){ …

Member Avatar for NormR1
0
399
Member Avatar for winecoding

I happen to read the following code segment from Thinking in Java [CODE]public class PetCount3 { static class PetCounter extends LinkedHashMap<Class<? extends Pet>,Integer> { public PetCounter() { super(MapData.map(LiteralPetCreator.allTypes, 0)); } public void count(Pet pet) { // Class.isInstance() eliminates instanceofs: for(Map.Entry<Class<? extends Pet>,Integer> pair : entrySet()) if(pair.getKey().isInstance(pet)) put(pair.getKey(), pair.getValue() + 1); …

Member Avatar for JamesCherrill
0
165
Member Avatar for jayyzhao

Hi Guys, I have a entry that uses keyboard.nextInt() is there a way to limit what it accepts and if its not right return a text string? I have tried using If and else statements for some reason they don't seem to be working. Any ideas?

Member Avatar for NormR1
0
60
Member Avatar for ferretfool0x77

[CODE]try { dataFile = args[0]; } catch (Exception e) { System.out.println("The file was not found. Please input file name now: "); dataFile = scan.nextLine(); }[/CODE] This gets a file name from the command line, and if no file is specified it asks the user to input a file name, however, …

Member Avatar for skoiloth
0
239
Member Avatar for gedas

hey guys i need java code that would convert .csv files to .xls. has anyone got any examples or anything similar? any help will be appreciated. thanks

Member Avatar for katarey
0
77
Member Avatar for gunjannigam

I am attaching my complete code, which I was currently developing. I am not able to get why doesn't my KeyListener work. None of the KeyListener events are fires on pressing the keyboard. Please have a look and tell me the flaws in my code [ATTACH]22414[/ATTACH]

Member Avatar for gunjannigam
0
7K
Member Avatar for coco24

Hi, im trying to move an object that moves only with the user input. For example if i type in 45, it will move 45 spaces. How would I go about doing that? Thank you for your time.

Member Avatar for JamesCherrill
0
80
Member Avatar for w0ot28

please help me... i will make Family Feud game in java... i dont know how will i start my project... T_T.. please help... give me some ideas... please...

Member Avatar for javaAddict
0
176
Member Avatar for perlsu

Can anyone help me to get the estimate value of float value 1001.27124 to 1001.27? Math.round(float) function return the int value. But I want to get float value result with 2 decimal point; Thanks in advance.

Member Avatar for mubin_89
1
4K
Member Avatar for m1n1m3

Hi ! To improve my java programming skills i like to write a really fancy fib. nr. calculator. Did it in C using memory allocation methods and hot to 1M digits in ~10min. So something like Step-Up challenge. The only thing as far as i can see limits my progress …

Member Avatar for NormR1
0
217
Member Avatar for aanders5

Trying to read a list of numbers in from the arraylist, and stick em into a matrix of int[][] int[][] board; board = new int[row][col]; ArrayList<Integer> temp = new ArrayList<Integer>(); so those are my two variables, and i have a for loop with variables, i and j...so I am trying …

Member Avatar for aanders5
0
362
Member Avatar for kweigand

First off, I am a Java Noob coding in latest version of NetBeans. I am trying to create a program the will allow the user to enter two decimal values: time and earnings in a swing GUI. [B]Basic Flow[/B] [LIST=1] [*]The user will enter the values in two different text …

Member Avatar for kweigand
0
174
Member Avatar for haripriyamca05

hai guys, see for example i have 15 banks details to print as pdf. but i wanted it to be printed only 6 banks per page. i have to get 3 pages for this 15 banks as 1-6 , 6-12, 12-15 respectively. Give me the suggestions to do it.

Member Avatar for Ezzaral
0
66

The End.