35,617 Topics

Member Avatar for
Member Avatar for abdullah_8

public class adding public class adding { public static void main(string[] args){ { int a=1; int b=2; sum c=a+b; system.out.println c;(sum c)-> } } help illegal start of expressions

Member Avatar for abdullah_8
0
156
Member Avatar for Anthony_8

i need help ! instead of ouputting password : admin i want to input asterisk password : ******* thanks in advance

Member Avatar for JamesCherrill
0
428
Member Avatar for minteks

Hey. I'm struggeling hard. Been trying for 5 hours straight without much progress. I just can't see what'ss wrong. This is my third week learning Java in school. I am looking for guidence. Don't want anyone directly solving the task for me. As that would be cheating, I would fail …

Member Avatar for Taywin
0
259
Member Avatar for erikasibulo

Create a java that asks the User which laboratory exercise to perform. consider the following specifications: # The program must incorporate all your laboratory exercise you can use cases, and all must be running. # every option in the menu must have t lest a single sentence definition of what …

Member Avatar for JamesCherrill
-2
192
Member Avatar for new_2_java

Hello everyone, I am populating a dropdown list in my webapp, from a MySQL database table. There are around 160,000 records in the table. When I start my webapp and when populating the content of the drop-down, it takes incredible amount of time, and eventually the browser crashes. I am …

Member Avatar for jwenting
0
697
Member Avatar for Caled

Hi, Im trying to display all the rows from a table (im running on Postgres and NetBeans 6.5). I only get one row.. my code: the actor class [code=Java] package appsClass; import java.sql.*; /* * To change this template, choose Tools | Templates * and open the template in the …

Member Avatar for jwenting
0
17K
Member Avatar for Cory_1

I am writing a program for extra practice from my book on finding the max element in array using Java Generics. My Code so far is: public class GenericMax { public static void main(String[] args) { Integer[] numbers = {1, 2, 3}; //Creates array of integers System.out.println(max(numbers)); String[] words = …

Member Avatar for JamesCherrill
0
6K
Member Avatar for hwoarang69

How to get min/Max value of a all column in a two-dimensional arra so for example, lets say you have the following 2d array: 1 2 3 4 5 6 7 8 9 Than the out put should be: -- col 1 -- min value at col 1 is 1 …

Member Avatar for JamesCherrill
0
750
Member Avatar for samantha2015

I am using jodatime for datetime. When I persist the date in mysql it stores 2015-09-04 10:30:18 instead of 2015-09-04 14:30:18. My timezone is GMT+4 or UAE. Do you know how to change the timezone? I try to put GMT+4 but it does not work. I run this line on …

Member Avatar for samantha2015
0
277
Member Avatar for Toby14

I have been trying to see what I did wrong in my code, but I counldn't find out. This is my second java program after the "Hello World". Could anyone help me to find out why I did not get the right answer for this. For example, if we enter …

Member Avatar for Toby14
0
141
Member Avatar for Vinolia

hi.i realy need help am a new beginner in java.so i have been trying to do a code in java that returns the largest counter,refering to my libraries.so i was trying to invoke the method comparTo,so i dont know how to use it to compare all counter arrays so that …

Member Avatar for JamesCherrill
0
249
Member Avatar for Ahmed_62
Member Avatar for JamesCherrill
-1
103
Member Avatar for Tanner_1

My code is getting a small error that is refusing to let me entire code compile. Take a look. //THIS IS ASSIGNMENT 4, MAIN METHOD import java.io.*; //to use InputStreamReader and BufferedReader import java.util.*; public class Assignment4 { public static void main (String[] args) { // local variables, can be …

Member Avatar for JamesCherrill
0
258
Member Avatar for sirlink99

Hello All. I am having 2 problems here with my code. I will start off with the video code first. The video code should capture 20 seconds of the screen at 50fps, however, when I generate it, it generates a 1 minute 7 second video, and I am not sure …

Member Avatar for sirlink99
0
1K
Member Avatar for hwoarang69

I have a file with ints like this. 1 2 3 4 5 6 How to read first int from file? How to read second int from file? How to skip first line and but rest in 2d array? This is what I have so far. I am not sure …

Member Avatar for Stefce
0
216
Member Avatar for EarhawkPH

I'm doing a quiz game using netbeans. I've already done the randomization of questions. The problem is, how do i keep a question from repeating itself? ex: chose correct answer --> questionrandomizer comes in --> next question appears but it's the same question earlier here's my code: package kiddiequiz.scienceforms; import …

Member Avatar for Stefce
0
265
Member Avatar for mjayyy

I have to display the mortgage payment amount and then list the loan balance and interest paid for each payment over the term of the loan but my output isn't changing. import java.text.DecimalFormat; import javax.swing.JOptionPane; public class MortgagePmt { public static void main(String[] args) { int term; //Term in years …

Member Avatar for mjayyy
0
1K
Member Avatar for samantha2015

My entity class: @Entity @Table(catalog = "emp", name = "person") @XmlAccessorType(XmlAccessType.FIELD) public class Person implements Serializable { private static final long serialVersionUID = 1L; /** */ @Column(name = "ID", nullable = false,length = 50) @Basic(fetch = FetchType.EAGER) @Id @XmlElement String id; /** */ @Column(name = "ADDRESS", length = 50) @Basic(fetch …

Member Avatar for jwenting
0
675
Member Avatar for divinity02

hi I am trying to build this game. what i have been trying to build for a long time now. it is a multiplication java game that need random numbers to generate it goes like this difficulty level-easy: this difficulty level easy has 3 rounds. the student must be tested …

Member Avatar for divinity02
0
420
Member Avatar for newcoder310

I have a class where there are a few `static final String` variables that have few values that repesent color values. The class is basically used to get the color values. Is it better to convert this to enum? public class Color{ public static final String GRAY50 = "#808080"; public …

Member Avatar for newcoder310
0
228
Member Avatar for divinity02

hi I am getting this an java.lang.array index out of bound exception: 2 error - I am wondering if this is where am getting it. look it over many times, and I know you all are tired of me but am learning. I like the array but it can be …

Member Avatar for newcoder310
0
271
Member Avatar for hari_10

Hi, i have form in my jsp , which when submitted ,calls javascript which will inturn submit the form , this is working fine in IE. but when i submit from chrome , i get below error. -version:2.5]] Servlet failed with IOException weblogic.utils.NestedRuntimeException: Cannot parse POST parameters of request: '/integration/r5/wfsworklist/WFTaskUpdate' …

Member Avatar for hari_10
0
1K
Member Avatar for Brandon Hatch

I have a problem with a project i'm working on, and I was wondering if it was possible to do what i'm thinking. Basically I have a simple mathematical GUI. I want it to take 2 inputs multiply them and output the answer. I am doing this all through the …

Member Avatar for Brandon Hatch
0
228
Member Avatar for s.redrose

Hello All i'm new to jsp developing and i'm working on a site contain news page and allows user comments . i already do it but having 2 problems first that i have to refresh after submit comment to show comment second that every time i refresh the comment is …

Member Avatar for stultuske
0
213
Member Avatar for samantha2015

I have an android application where user will input data about car. When they are done, they will press a button to sync their data. That is, on pressing the button it will call a rest webservice (Jersey) to synchronize the data with the server which will store the data …

Member Avatar for stultuske
0
175
Member Avatar for Mysquldata
Member Avatar for Curious Gorge

I'm working on a simple encryption program (for school). It is not currently "homework" just FYI, I'm just practicing the examples in the book. It uses a Caesar's Cipher method (an alphabetical shift). I have not tested this code very much. If something is wrong with it I probably don't …

Member Avatar for Curious Gorge
0
240
Member Avatar for EarhawkPH

**I'm using netbeans btw if you notice the long code for the GUI** I'm doing a quiz game. The questions are randomized. My problem is, the randomized questions do not appear on the questionLabel (JLabel Variable). I don't know what to do. Help? /* * To change this license header, …

Member Avatar for EarhawkPH
0
175
Member Avatar for debee

Hi there, I wondered if some one would be able to put me through with this, as i am a newbie in Java. I have the following text file named dvdifo: *Donnie Darko/sci-fi/Gyllenhall, Jake Raiders of the Lost Ark/action/Ford, Harrison 2001/sci-fi/?? Caddy Shack/comedy/Murray, Bill Star Wars/Sci-fi/Ford, Harrison Lost in Translation/comedy/Murray, …

Member Avatar for JamesCherrill
0
206
Member Avatar for gahhon

String contentType = request.getContentType(); if ((contentType != null) && (contentType.indexOf("multipart/form-data") >= 0)) { DataInputStream in = new DataInputStream(request.getInputStream()); int formDataLength = request.getContentLength(); byte dataBytes[] = new byte[formDataLength]; int byteRead = 0; int totalBytesRead = 0; while (totalBytesRead < formDataLength) { byteRead = in.read(dataBytes, totalBytesRead, formDataLength); totalBytesRead += byteRead; } String …

Member Avatar for gahhon
0
501

The End.