31,002 Topics

Member Avatar for
Member Avatar for poojakakde000

code in java for send a free msg from internet to mobile phone like way2sms or 160by2 sites................. what are the requirments for that???? pls reply as fast as possible...........

Member Avatar for stultuske
0
129
Member Avatar for bCubed

I downloaded eclipse to my windows 8 computer along with the jdk and when I launch eclipse it tells me that it cannot not find the jre or jdk and that it is not in my current PATH. I have tried setting the path to the jdk folder but it …

Member Avatar for bCubed
0
336
Member Avatar for Benjamin_4

Hello guys i want to show a data in my combobox when i click on an item ion my jtable i tried this but it doesn't work. i would apprecite it if any one can help thanx String add5 = rs.getString("Id_branch"); branch_combo.setSelectedItem(add5); String add6 = rs.getString("User_Role"); UserRole_combo.setSelectedItem(add6);

Member Avatar for JamesCherrill
0
133
Member Avatar for <M/>

I am trying to write a program to calculate mean & standard deviation. I sort of figured out how to find mean (it is not correct yet, so i am going to need help on this part as well) but how do you do standard deviation? import java.util.Scanner; public class …

Member Avatar for dev90
0
489
Member Avatar for <M/>

This is a code that I wrote and for some odd reason it doesn't count the number of inputted integers properly. import java.util.Scanner; public class IntegerCount { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Enter an integer, the input ends if it is 0: "); int …

Member Avatar for dev90
0
317
Member Avatar for rohan21blade

**HEre is my checkout.java** index LCval = new index(); final String LCnum = LCval.getVal(); JButton btnNewButton_1 = new JButton("Finish"); btnNewButton_1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { try{ int bal = 0; Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); String connectionURL = "jdbc:sqlserver://ROHAN\\SQLEXPRESS;Database=sys;user=rohan;password=rurouni;"; Connection con = DriverManager.getConnection(connectionURL); PreparedStatement pst =null; ResultSet rs = null; //Statement st=con.createStatement(); …

Member Avatar for JamesCherrill
0
288
Member Avatar for <M/>

Is this correct? I wrote a decimal format and it doesn't work. how do i correct this: return sum / myFormatter.format(Math.sqrt(x.length - 1)); I will submit the full code if needed.

Member Avatar for dev90
0
162
Member Avatar for nay.htet.1481

I learn Java programming language. I have a .exe file that was produced with lunch4j. I can easily run that application in my computer but I can't run it in other computer. I got error ""Window can't access the specified device, path or file, you have the may not have …

Member Avatar for stultuske
0
228
Member Avatar for JRDJ12

My requirements are as follows: 1. use main method 2. use the following array- `int[] grades = new int[] {` `82, 70, 99, 90, 92, 75, 87, 85, 91, 100, 91, 87 ` `};` 3. Write code to step through the array of grades and calculate the average grade. Modify …

Member Avatar for JamesCherrill
0
10K
Member Avatar for Graphix

Hey everybody, Lately I have written the game Hangman in many different languages (C, JavaScript, Java and PHP so far). Here is the code snippet for Java! It uses a words file, on the bottom of this post you will see a small example of a few words. The source …

Member Avatar for JamesCherrill
2
4K
Member Avatar for <M/>

I am trying to do an assignment that requires us to do something with pentagonal numbers. This is my code: import java.util.Scanner; public class Pentagonal { public static void main(String[] args) { System.out.print("The Pentagonal Numbers: "); getPentagonalNumber(10); } public static int getPentagonalNumber(int n) { Scanner input = new Scanner(System.in); System.out.print( …

Member Avatar for <M/>
0
1K
Member Avatar for <M/>

I am trying to reverse the number that is doubled from the user input. Problem is that if they enter a number like 20000 it gets doubled into 40000 but it reverses it to 2 rather than 4. How do i get it to make the doubled number reversed and …

Member Avatar for <M/>
0
248
Member Avatar for <M/>

Okay, so for another assignment I have to find the distance of two points. I understand how that works but for some odd reason, when the program the professor set up tests it, the numbers are way off. This is what i have done: public class Distance { public static …

Member Avatar for <M/>
0
222
Member Avatar for sciwizeh

I made this minesweeper game earlier this summer. It shows many things, including: array use, 1D array to 2D array, gridlayout, changing the way a JButton works depending on mouse button used, floodfill, loops, GUI. slightly long, 382 lines, can probably be condensed. There is one known bug that i …

Member Avatar for sciwizeh
2
818
Member Avatar for <M/>

This is how you calculate the area of a triangle, hope you guys find this useful. import java.text.DecimalFormat; import java.util.Scanner; public class Exercise2_15 { // find the area of a triangle public static void main (String [] args) { double side1 = 0; double side2 = 0; double side3 = …

Member Avatar for JamesCherrill
0
200
Member Avatar for <M/>

Hi guys, i am trying to find the area of a triangle and for some odd reason i can't get it to produce the right numbers. Here is my code: import java.util.Scanner; public class Exercise2_15 { // find the area of a triangle public static void main (String [] args) …

Member Avatar for <M/>
0
467
Member Avatar for Tapan1

[CODE] try { Class.forName("oracle.jdbc.driver.OracleDriver"); Connection con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger"); if (con == null) System.out.println("Connection not successful"); else System.out.print("successful...."); con.close(); } catch (Exception e) { e.printStackTrace(); } [/CODE] Error: [CODE] java.sql.SQLException: The Network Adapter could not establish the connection at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:412) at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:531) at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:221) at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:503) at …

Member Avatar for stultuske
0
966
Member Avatar for xchris

Hello I'm new to programming and I'm trying to make a java application that will "hear" (not record necessarily) the sound and display how loud is.I'm thinking of converting the sound recordings to numbers,so I can see the difference on the sound levels.I got this code and I added the …

Member Avatar for xchris
0
1K
Member Avatar for hajjo

I have following questions, can someone tell me if i answered correctly Can we configure portlet wiring for two portlets mapped on two different pages? no Custom Validators in JSF will be executed during the Render phase, is it correct? yes SOAPUI is specialized in optimizing the web services message …

Member Avatar for stultuske
0
142
Member Avatar for Helpmeplease123

How do you add a membership records in java(bluej) First Name, Last Name, phone number. Please can you help me

Member Avatar for ObSys
0
252
Member Avatar for migu2990

Hi, I was asked to make a Phone Book thats saves entries and call them up. Then the teacher added a new task. The Program should delete entries. He gave us a methode and said we are not allowed to use ArrayList or Hashmaps, ONLY Arrays. I tried alot but …

Member Avatar for migu2990
0
406
Member Avatar for Benjamin_4

Hello guys i want to know if its possible to format a text as it is done ms-word on a jframe? i want to be able to edit the text i put on my jframe by specifying the heading, making some texts bold, adding font color to som texts and …

Member Avatar for JamesCherrill
0
95
Member Avatar for <M/>

Okay, last question of the night. My program is to have a program collect a number, double it, and reverse. I am having problems with reversing it... Here is my code: import java.util.Scanner; import java.text.DecimalFormat; public class ReverseNumber { public static void main(String[] args) { Scanner s = new Scanner(System.in); …

Member Avatar for kal_crazy
0
171
Member Avatar for Violet_82

hi guys, I wonder if anybody can clarify something for me. Take these 2 fragments of code (2 constructors belonging to 2 different applications): First one: public MouseTrackerFrame() { super( "Demonstrating Mouse Events" ); mousePanel = new JPanel(); // create panel mousePanel.setBackground( Color.WHITE ); // set background color add( mousePanel, …

Member Avatar for Violet_82
0
372
Member Avatar for nikolaos

Testing the following code from a book public class RunTime { public static void main(String[] args) { Runtime r = Runtime.getRuntime(); //MEMORY MANAGEMENT long mem1, mem2; Integer intmatrix[] = new Integer[1000]; System.out.println("Total memory is :" + r.totalMemory()); mem1 = r.freeMemory(); System.out.println("Initial free memory is :" + mem1); r.gc(); mem1 = …

Member Avatar for mKorbel
0
769
Member Avatar for <M/>

Okay, so this is a similar error to the code before. So I created this: import java.util.Scanner; public class IntegerCount { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Enter an integer, the input ends if it is 0: "); int num = input.nextInt(); if (num == …

Member Avatar for <M/>
0
331
Member Avatar for <M/>

On my code, it says that there are 2 mistakes and I can't fix them. Here is my code: import java.util.Scanner; public class Exercise4_1M { public static void main(String[] args) { int countPositive = 0; int countNegative = 0; int count = 0; int total = 0; Scanner input = …

Member Avatar for <M/>
0
328
Member Avatar for tbuchli

// Create the cboSelectGroup, and add it to the navigation panel: //String[] strDefaults = {"Defaults"}; //cboSelectGroup = new JComboBox(strDefaults);Public Class Form1 cboSelectGroup.setPreferredSize(new Dimension(150, 40)); cboSelectGroup.setMinimumSize(new Dimension(150, 40)); cboSelectGroup.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnImagesActionPerformed(evt); } });

Member Avatar for tbuchli
0
283
Member Avatar for <M/>

Hi guys, I am working on an assignment for a class of mine (Java) and I am really frustrated with it. This was my very last attempt (out of like 20)... System.out.print( "Enter temperature in Celsius to convert to Fahrenheit: " ); double c = kbinput.nextInt(); double f = ( …

Member Avatar for <M/>
0
226
Member Avatar for Pratique

The End.