32,205 Topics

Member Avatar for
Member Avatar for nitin1

Does C++ consider \/ as an escape character? And does Java consider it? I am talking about forward and backslashes. Please tell. How does Java and C++ considers them differently? I mean : in C++: this '/' works fine without escape. in Java: this '\/' will result in '/'. Is …

Member Avatar for nitin1
0
236
Member Avatar for David_50

I worked for 20 years in hardware and twenty odd now in software, so change is an old friend. I consult on UNIX/LINUX to a variety of industries, write lots of bits for my own needs, love to help others over their hurdles.

Member Avatar for JorgeM
0
230
Member Avatar for KymDervy

Using Java is it possible to upgrade LG U900 version to accomodated some common applications like whatsup? Can its RAM be upgraded? Thanks guys

Member Avatar for peter_budo
0
75
Member Avatar for joshua_8

Invalid escape sequence in ^[SFTG]\d{7}[A-Z]$ Pattern .compile("^[SFTG]\d{7}[A-Z]$");

Member Avatar for stultuske
0
117
Member Avatar for divinity02

write a program that will display all the odd numbers between 1 and 15. here is the code that i used Scanner scan = new Scanner (System.in); int i, num=0, count_odd = 0; for(i=1; i<=15; i++) { System.out.println("please enter number "); num = scan.nextInt(); } if(num%2!=0) { count_odd++; } System.out.println("The …

Member Avatar for stultuske
0
311
Member Avatar for joshua_8

Hi how do I remove [] in my arraylist my sample output is [[3, 6, 5, 1, 2, 8, 50, 6, 1, 3, 1, 54, 1, 3, 1]] I just want 3, 6, 5, 1, 2, 8, 50, 6, 1, 3, 1, 54, 1, 3, 1

Member Avatar for JamesCherrill
0
94
Member Avatar for mxwarning

Hello Again, I am in need of some help getting my GUI to display the inventory values. The code runs and compiles successfully, but it does not display anything. I am new to this and could use some help. Thanks! package inventory; import java.text.DecimalFormat; import java.util.Arrays; import javax.swing.*; import java.awt.*; …

Member Avatar for stultuske
0
3K
Member Avatar for kazek

I wrote a java program/application and I'm trying to combine all the .class files into one .exe file. I want to have a convenient double-clickable EXE file to launch the program without the user having to handle .java file associations.

Member Avatar for stultuske
0
5K
Member Avatar for Reverse_1

try{ String str = "select * from stocks"; stmt = conn.prepareStatement(str); ResultSet rs = stmt.executeQuery(); while(rs.next()) jcbStock.addItem(rs.getString("stockID")); }catch(Exception e){ e.printStackTrace(); } I have this code in other class , and i want call it in my main class. Anyone can tell me how to do?

Member Avatar for stultuske
0
183
Member Avatar for ambageo

Hi to all of you! I'm using Eclipse Luna 4.4.1 for Mac. I have made a project for a Java seminar I am attending.My project consisits of several classes that runned perfectly fine...until today.That is , when I opened one of my classes and made some changes I started getting …

Member Avatar for ambageo
0
331
Member Avatar for Sylvia_H

i need to write a program to output an ascii art pattern. the size of the pattern should change dynamically based on class constants. if i change the class constants, the pattern changes. Should look like this Number of boxes: 4 Width of boxes: 6 Height of boxes: 3 +------+------+------+------+ …

Member Avatar for Slavi
0
237
Member Avatar for Wendy_2

Beginner programmer here and I am lost on a project for a class. I have to develop a Java application that calculates the monthly paychecks for a numbe of different types of employees. The employee types are created in a subclass array based on parent base class Employee. The initial …

Member Avatar for Wendy_2
0
273
Member Avatar for joshua_8

Hi I need to add a line above my pdfcell in pdf table but I do not know how to do it.

0
91
Member Avatar for joshua_8

Convert from int arraylist to string arraylist and double arraylist to string arraylist java

Member Avatar for Search_not
0
109
Member Avatar for divinity02

does anyone have any ideas or codes in building a game using java codes. my last assignment is building a game and I have no idea what to do or how to even start and where to start. can anyone give me any ideas on how do I go about …

Member Avatar for llgms
0
321
Member Avatar for hedrun

Hi, Everyone! So, i need a simple swing binary tree code, if anyone of you guys have it, please share to me =( Thanks, a big hug.

Member Avatar for JamesCherrill
0
176
Member Avatar for Heba_2

Hello everyone!!! Can anybody help me to fix this error... While running my game source code on command prompt i get one error. Note: tetris.java uses or overrider a deprecated API. Note: Recompile with -deprecation for details. please help me to fix it.

Member Avatar for JamesCherrill
0
110
Member Avatar for joshua_8

Hi I have a arraylist of string , I want to parse this arraylist to my pdfpcell , but my arrayList keep looping here is my code ArrayList testList = new ArrayList(); 1,2,3 for(i=0; i<testlist.size();>{ new PdfPCell(new Phrase(testList.get(i)); document.add(table); } document.close();

Member Avatar for JamesCherrill
0
107
Member Avatar for cherry05

i wrote an program relating to employee payslip but i got an error..can u clarify me?`Inline Code Example Here` class Employee{ int empId; int bSal; Employee(int a,int b){ empId=a; bSal=b; } } class PayShip{ int calculate (Employee e6) { int os=e6.bSal; int ta=(os*5)/100; int vehAlo=(os*10)/100; int da=(os*2)/100; int grossSal=os+ta+vehAlo+ da; …

Member Avatar for stultuske
0
70
Member Avatar for divinity02

I initialize the salary and this is the result i get, is it correct, to me it doesnt look correct, I could be wrong public static void main(String[] args) { Scanner scan = new Scanner (System.in); int age, sum, difference, old_salary, new_salary, salary = 0; System.out.println("Please enter the person age"); …

Member Avatar for divinity02
0
116
Member Avatar for yamigx

My problem is sorting strings given in three lists using implementation of A* search,so I need to develop a heuristic function that will make solving various instances of this problem efficient. The state can be represented s a list of 3 lists, example: [ [C B], [D], [H G F …

0
92
Member Avatar for john jr

Hello my friend out there i realy need help .i'm working on one of my class labs but things is not that write to me...could one out there assist me thanks you. here is the quz<<<<<< Write a program in HTML and JavaScript for the following tasks: Find the maximum …

Member Avatar for stultuske
0
113
Member Avatar for Trevor_4

import java.util.*; public class temp { public static void main (String[] args) { //Declear variables int LowT=0, HighT=0, high, low, RangeT=0, zip, k, d, i; double Avg, HighAvg=0, LowAvg=0, RangeAvg=0; //New Scanner Scanner input = new Scanner(System.in); //Informs user on what the program does System.out.println("This program calculates highest, lowest and …

Member Avatar for stultuske
0
171
Member Avatar for divinity02

Write a program to input a person’s age and salary. If the age is over 32, then add $1000, otherwise subtract $500 from salary. Finally output the age and new salary. here is the problem Scanner scan = new Scanner (System.in); int age, sum, difference, old_salary, new_salary, salary; System.out.println("Please enter …

Member Avatar for divinity02
0
132
Member Avatar for Search_not

How do I add HTML5 functionality to my browser? Its still a work in progress, so ignore the event handlers and buttons that seem pointless... package browser; import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; public class ReadPage extends JFrame { private JTextField address; private JEditorPane display; private JButton refresh; …

Member Avatar for Slavi
0
153
Member Avatar for sciprog22

Hello, Thank you for your time! I have an applet where I have two blocks moving: When the program starts: a)The first block is constantly moving with a time delay of 100 ms about the horizontal direction at the top end of the applet (x starts at 0 and is …

Member Avatar for sciprog22
0
162
Member Avatar for redtribal23

the program works the way i want it to except for the inputmismatchexception. import java.io.File; import java.io.IOException; import java.util.Arrays; import java.util.InputMismatchException; import java.util.Scanner; public class Exception { public static void main(String[] args) throws IOException { int num = 100; int tempNum; int index; String[] strArray = new String[num]; int[] numArray …

Member Avatar for stultuske
0
564
Member Avatar for sciwizeh

I have user login info stored with JPA along with a room. The room has a list of users, the users have a transient field, which is where my problem is coming in. @Entity public class User{ //some other stuff ids and such @Id @GeneratedValue(generator = "increment") @GenericGenerator(name = "increment", …

Member Avatar for sciwizeh
0
281
Member Avatar for joshua_8

for(int i-=0; i<firstItems.size(); i++ { table.addCell(String.valueOf(firstItems.get(z))); document.add(table); document.close(); response.addHeader("Content-Disposition", "attachment; filename="test.pdf"); OutputStream out = response.getOutputStream(); baos.writeTo(out); out.flush(); } Hi I got an error stating the document has been closed. You can't add any Elements.

Member Avatar for JamesCherrill
0
155
Member Avatar for miladrahimi93

Hello buddies! I'm new at Java SE Porgramming with PHP background. I've made a simple app which uses JSON to save some data and I would like to use MySQL database but there was some question for me. 1. If I used MySQL or any database, how much would my …

Member Avatar for JamesCherrill
0
214

The End.