32,205 Topics
| |
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 … | |
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. | |
Using Java is it possible to upgrade LG U900 version to accomodated some common applications like whatsup? Can its RAM be upgraded? Thanks guys | |
Invalid escape sequence in ^[SFTG]\d{7}[A-Z]$ Pattern .compile("^[SFTG]\d{7}[A-Z]$"); | |
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 … | |
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 | |
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.*; … | |
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. | |
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? | |
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 … | |
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 +------+------+------+------+ … | |
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 … | |
Hi I need to add a line above my pdfcell in pdf table but I do not know how to do it. | |
Convert from int arraylist to string arraylist and double arraylist to string arraylist java | |
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 … | |
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. | |
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. | |
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(); | |
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; … | |
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"); … | |
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 … | |
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 … | |
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 … | |
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 … | |
| 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; … |
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 … | |
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 … | |
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", … | |
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. | |
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 … |
The End.