32,199 Topics
| |
I am working on PHP Framework now.I am 23 old . I will have 2 years of experience by 2016.And Company Bond will be over ,and i will be able to leave the company. I worked on cakePHP,Wordpress,WHMCS,Smarty etc.and will work on other PHP Technologies by 2016. I want to … | |
Hi guys , please look here . Consider code segment String a=new String("SMS Message"); String b=new String("SMS Message"); if(a==b) System.out.println("they are equal"); i) why it does not generate an output ? ii) how can we rewrite the program such that it will print the output ? | |
I'm trying to create a sorted linked list without using Collections. I don't want to use Collections since I'd like to learn how to work with Linked List manually. I'm getting NullPointer exception when I'm comparing strings and comparison <0. Any suggestions and help are appreciated. This is the part … | |
Hi guys i am using sax to extract data from an xml file but i can't seem to discover how to extract <![CDATA[%s]]> from the xml below is the xml and the java code //java codepublic class XmlParser { public XmlParser(String xml) { try { SAXParserFactory factory = SAXParserFactory.newInstance(); SAXParser … | |
Hello guys, I created two database in derby: DB1 with one table Customers and its columns id,name,last And DB2 with one table Purchases anf its colums CustID, total I would like to makes queries from data in both of these database. I tried SELECT C.name, C.last, U.Total FROM DB1.Customers C … | |
consider the following code segment String a="hello"; String b= "hello"; if (a==b) System.out.println("they are equal"); i ) Why does it not generate output? ii)How can we rewrite the program such that it will print the output? | |
what is the notion of event driven architecture in context of GUI ? | |
"a menu must be provided that asks the user of the software what task they would like to perform; it then activates the required task. The menu should loop until the user requests to exit"- that is the requirement. And i haven't learn about switch-case. So how can i create … | |
Hi guys , I dont have idea on how to solve this problem . I attach my question but I dont know whether it is true or not. Can you please help me Given an output file named "data.txt" write the code fragment to i ) set up the file … | |
Hi and good day to all, Just a curious question, when I am comparing a String object with blank space(" "), I type x.equals(" ") in my Netbeans IDE(x is a String type variable), but Netbeans automatically shows it's an error and change it to " ".equals(x) instead. Anyone here … | |
import javax.swing.JOptionPane; public class StudentReport { String name; //name of the student String schoolName; //name of the school String schoolGrade; //grade in school int numOfGrades; //number of grades or number of classes double grades; //grades received double average; //average of the grades double total=0; //initialize total String trash; //to convert … | |
hello, i am in need of some help with a bit of code i been working on. i am getting "illegal start of expression" and "reached end of file while parsing" errors and its been bugging me for awhile as i am not sure why. can anyone help me to … | |
I'm implementing a generi method that's supposed to traverse a binary tree in PostOrder but when I attempt to use it, the Iterator doesn't work as It should when I attempt to use ot on a Binary Tree, can anyone spot my mistake in the code? Thanks. The method makes … | |
import javax.media.*; import java.io.*; public class MP3Player { public static void main(String[] args) throws Exception { File file = new File("xyz.mp3"); MediaLocator mrl = new MediaLocator(file.toURL()); Player player = Manager.createPlayer(mrl); player.start(); } } }`` when i execute above program, it shows error : Failed to configure: com.sun.media.PlaybackEngine@ce124a7 Bad header in … | |
How would I write this program: Wrte a program that will read a line of text that ends witha period, which serves as a sentinal value. Display all the letters that occur in the text, one per line and in alphabetical order, along with the number of times each letter … | |
Please help me I cant answers these questions at all . Question b Suppose a class named FootballClub is to be definêd. i. Suggest THREE (3) data members for the class' ii. suggest TWO methods other than accessors and mutators for the class' iii. code the class in Java based … | |
public class NumFormat { public static void main (String [] args ){ int quarter = 2; int dollars = 3; double total = dollars + quarter * 0.25; final double TAX_RATE = 8.5; double tax = total * TAX_RATE ; NumberFormat formatter = NumberFormat.getNumberInstance (); formatter.setMaximumFractionDigits (2); System.out.println ("Totali:$" + … | |
how to search in double linked list in java ? | |
Hi i m trying to make a combobox that user can choose a value from a table this value then it is saved i have the code really i m stucked on combobox.. import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; import java.awt.Font; import java.awt.GridBagLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; //The API for … | |
How do i get make the correctLabel to have all the text disappear so there is NO "correct" and the "buttonclicked values". I have been tryin but i can only manage to get the "correct" to dissapear the button clicked values are not removed correctLabel.setText("Correct: " ); // this sets … | |
Im trying to add odd numbers recursively from n to m but its not working . im sure its in the recursive logic on how im passing the arguments or something. public static int OddSum(int low, int up,int total) { if(low==up) { return up; }else { low+=2; return total += … | |
I am just learning how to call arrays through methods and I know how to do it when they are integers, however, my teacher did not go through too much on what to do with Strings. I figured they weren't much different, overall same concept, however I keep getting an … | |
Hello everyone, I am writing a Java program to reset LDAP account password. I know the password should be quoted passwrod and then encoded in UTF-16. I have a question, if someone can confirm please. I am getting encoded password as follow: String oldPassword = "Password1234"; String newPassword = "Password9999"; … | |
Hi just starting learning java jdbc .. i have this error: Type mismatch: cannot convert from int to Object **tempRow = new Object[]{rows.getInt(1), rows.getString(2), rows.getString(3), rows.getDouble(4), rows.getString(5), rows.getInt(6), rows.getDouble(7),rows.getString(8)}; ** | |
I want to print byte array using print() in javascript. Is there any way to implement this..? | |
So I'm teaching myself Java. I'm creating a text based game. I have an if statement that i want to check users input so its like this: if(sc.next() = "help"){ System.out.println("info"); } else if(sc.next() = "item"){ System.out.println("info"); } Etc. But it wont work. What would be the proper way to … | |
*Doing the PSEUDOCODE but stuck in the middle. Please help me out.* Scenario: After practicing and learning problem solving skills for an extended period of time, you have decided that life would be easier if you did not need to continue with school. Rather, you decide that winning a large … | |
Creating a text based game. I have a method for each of the following: Race, profession, name. So for instance: public static void main(String[] args) { // TODO code application logic here intro(); name(); System.out.println("Welcome " + name); } public static void String name(){ System.out.println("Enter Name:"); String name = sc.next(); … | |
Hello, I'm trying to calculate the maximum and minimum distance between 10 points. My method to calculate the maximum distance is working fine however my method to calculate the minimum is returning 0.0 and I'm not sure why. Could someone please take a look at my code and tell me … | |
I'm trying to setup the programming environment for Princeton's online course at this website: http://algs4.cs.princeton.edu/code/ However, when I try and run one of the programs I get the following error: /Users/dane/algs4/algs4-2/RandomSeq.java:45: cannot find symbol symbol : variable StdRandom location: class RandomSeq double x = StdRandom.uniform(); ^ /Users/dane/algs4/algs4-2/RandomSeq.java:46: cannot find symbol … |
The End.