32,199 Topics
| |
Hi, I am a PHP developer that has been put on a Java project and am trying to apply the same principles with new ones that Java provides and am stuck. I have successfully instantiated a class with a variable class name, which contains a constructer that has one parameter. … | |
you are to write a Java program that asks the user to enter the following 4 numbers one at a time: 4.34 , 2.39, 1.34 0.9. Thereafter the is to print all the numbers back onto the screen followed by the average of the four numbers. Finally it should print … | |
Hi guys how are you? I am having tough time extracting data from the ms database. I have three rows. WHat I want to do is the extract data from these three rows and pass to labels and display in the frame. But I'm stuck on the first one. my … | |
int counter; counter=1; rs = statement.executeQuery("SELECT * FROM Quiz WHERE SrNo=counterr"); | |
I was studing the ant task dirname. I am in over my head understanding this animal. It suggests to me that I could use build.properties and or build.xml properties . The same possibility arises in java code and I benefited greatly by loading xml properties. In the ant enviornment is … | |
what is the difference between this packages in Eclipse?Im beginner in java which package should i download. Luna Packages Kepler Packages Juno Packages Indigo Packages Helios Packages Galileo Packages Ganymede Packages Europa Packages | |
I have a button with action listener. When action is performed I call a method to show a label with my message using: Actionperformed(){ ShowMessage(); PerformAction(); } NOTE: This code is just an example. The problem is the message never shows even though the action is performed. Any help will … | |
I'm Having a problem with trying to figure out how to get my program to switch from one tab to another after a specific "Jbutton" is clicked. As displayed Below. | |
Hi everyone, consider below code: interface i{ void test(); } class A implements i{ void test(){//code goes here} } class B implements i{ void test(){//code goes here} } here,we can implement method straightaway in class itself, without using interface like, class A{ void test(){//code goes here} } why we want … | |
Hi everybody! I´ve used jdk to generate my certificate with the following command: > keytool -genkey -keyalg RSA -alias certificatekey -keystore keystore.jks -storepass password -validity 360 -keysize 2048 Everything works fine when I want to digitally sign an e-mail using: # import javax.mail.* # and # import javax.mail.internet.* # and … | |
Hi, evry1.. i need yur help.. i want to place an image as my background.. how am i supposed to do it..?? i have tried this `setBackground("C:\\image\\background.jpg");`i also tired this `Icon m1 = new ImageIcon("C:\\New folder (5)\\background.jpg");lb1.setIcon(m1);` But none of this is working.. what shuld i do??? | |
I had installed Java SE 7u67(windows7 64bit) in D: drive after that i installed netbeans 7.4 but it is showing JDK(1.7.0_67)not compatible with netbeans. | |
I ve made an windows phone app in c# and now I m making equal android app. I ve come to the problem where I have to compare some times. In c# there is a well known TimeSpan class but I see that java(Android) does not have such class. Could … | |
I am new to Java programming and I am struggling and I need help understanding how to write this code for writing a statement public method called calculate interest that accepts account balance and interest rate as arguments. This method should calculate and return the interest by multiplying the two … | |
hi!!.. my name is nathan i am trying to davelop voice to text java application i am required to use javax.speech package and i cant find it on my java packages. if any body knows where i can dowmload it please help!! | |
I observed one thing about my right click on the JTable. If I right click on a row. it shows my popUpMenu item. But now if I right click on another row, I must right click 2 times on the other row before my Jpopup appears. Is that any way … | |
I want to add jni code into my servlet,i have used JNI in my desktop application but now i want to add in my java web project. let me tell you a condition.i have logic code on c++ and i want to add that code with my java web project.so … | |
| Greetings, I am trying to upgrade an existing system from CF 8 to CF 10. I have a datasource that connects to a Unidata database. The datasource connects on the CF 8 server using driver class com.ibm.u2.jdbc.UniJDBCDriver and driver uniJDBC. I set the datasource up on CF 10 the same … |
1. <?php 3. /* 4. $con = mysql_connect("localhost","root",""); 5. if (!$con) 6. { 7. die('Could not connect: ' . mysql_error()); 8. } 9. mysql_select_db("nvron",$con); 10. */ 13. $con = mysql_connect("localhost","nvronusr","DBpwd!@#"); 14. if (!$con) 15. { 16. die('Could not connect: ' . mysql_error()); 17. } 19. mysql_select_db("nvron", $con); 20. $DOWNLOADPATH='C:\Users\LENOVO\Desktop'; // … | |
Hi i have to make this program that will read a message from another text file and surround each occurence of an abbreviation with <> brackets. and the write the marked message to a different file. The program must beable to read from a text file that contains the abbreviations … | |
1. Give a definition of a class named Arithmetic whose methods are three add() and multiply() and one subtract() and divide(). 2. Parameter for add() and multiply() should be two, three and four int respectively. 3. Parameter for subtract() and divide() should be two int. 4. Applying method calling in … | |
Hi, I've done my bachelors in Computer Science and was working for the past 2 and a half years in PHP and MySQL. Now I'm planning to change my career path to IBM Websphere Administration. However, changing directly from PHP to Websphere seems quite impossible. So I've planned to take … | |
*getting following error. duplicate found Exception in thread "main" java.lang.NullPointerException at binarysearchtree.main(binarysearchtree.java:185) Java Result: 1 here is my code* public class node<T> { public node<T> root ; public T data; public node left; public node right; public node (T newData) { data = newData; left = null; right = null; … | |
A pseudoperfect number, sometimes also called a semiperfect number (Benkoski 1972, Butske et al. 1999), is a positive integer such as which is the sum of some (or all) of its proper divisors, A pseudoperfect number which is the sum of all its proper divisors is called a perfect number. … | |
Hy i have this js code: <script type="text/javascript"> var msg_id; @if(Session::has('message')) {{"msg_id = ".Session::get('message').";"}} <?php Session::forget('message'); ?> @endif $(function(){ jQuery.each( inbox, function( i, val ) { $('#contact_'+val).parent().addClass('inbox'); }); jQuery.each( others, function( i, val ) { $('#contact_'+val).parent().addClass('others'); }); $(".others").addClass('hide'); $("#inbox").removeClass('bg-inverse').addClass('bg-primary'); if(msg_id){ console.log(others); if($.inArray(msg_id.toString(),others)>-1){ $('#others').trigger('click'); } $('#contact_'+msg_id).trigger('click'); }else{ if(inbox_1.length>0){ if(others_1.length>0){ $('#contact_'+inbox_1[0]).trigger('click'); }else{ … | |
There are two classes: - ListViewActivity extends Activity, - MyAdapter extends BaseAdapter. MyAdapter overrides the getView method and creates an item in ListView, which drawn in ListViewActivity. I want to call setOnClickListener in MyAdapter.getView, but the listener must be placed in another class - not in MyAdapter. Standard approach is: … | |
//here's a singly linked list program with functions. However, I don't kbow how to add function #7 wherein //the position of the maximum number in the list should be displayed.. :( import java.util.Scanner; class Node { protected int data; protected Node link; protected int next_num; public Node() { link = … | |
I hear that the new version of Java, Java 8, does not support a way to connect to MS Access database... I have a rather big problem in this case as I created all my databases with access (And im not porting them to SQL). I wanted to update my … | |
I'm making a student system with console based java. I'm trying to load a text file's content to an ArrayList and later on search with a student registration number and list down his/her name and program. I'm having a hard time loading the text file contents in an ArrayList so … | |
Runtime r = Runtime.getRuntime(); Process pr = r.exec(cmdString) I can get the prompt result when I try "cmd /c type f1.properties", however, when the size of file is larger the command will hang and no output I could get and no exception occurred. Is there any limitation for java to … |
The End.