35,619 Topics
![]() | |
I have been working on role based access control in cloud for which I have coded some java programs. I would like to upload and run those java programs on a real-time cloud. I have no idea about uploading a "file" onto the cloud although i have a decent knowledge … | |
Hi How can I get the maximum digit from a number entered by the user? Example: if user inputs: 1521, the program should output 5 as maximum. Any help please? NOTE: I want it to be made using 2 methods. AND don't give me answers with arrays. :) This is … | |
![]() | I need to write a Java program that uses a Monte Carlo algorithm to calculate the probability that next week’s lottery draw won’t have any consecutive pairs of numbers (e.g. 8 and 9 or 22 and 23). 6 numbers are drawn from 1 to 45. ![]() |
Alright, I've never done this before so this may not be the way to go about it, but here goes. I'm creating an Application that connects to a Server which executes SQL Queries. I am coding the Application as a prototype in Java currently and extending it later possibly with … | |
package filehandling; import java.awt.event.ActionEvent; import java.io.*; import java.awt.*; import java.awt.event.ActionListener; import javax.swing.*; public class Filehandling extends JFrame{ JTextArea ja; JButton jb; Filehandling() { setBounds(400,400,400,400); setTitle("azeem"); setVisible(true); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); Container cont= getContentPane(); ja=new JTextArea (); cont.add(ja,BorderLayout.CENTER); JPanel jp= new JPanel(); jb=new JButton ("Save"); jp.add(jb); cont.add(jp,BorderLayout.SOUTH); setVisible(true); } public static void main(String[] args) … | |
Hey, I'm looking for decent MySQL tutorials for connecting a Database in Java. I'm using Java 8 so preferably would like tutorials that correspond with newest code. Thanks! | |
hi :) I'm wondering >>what is the use of (static) word in func.'s ? in this code what does it mean ??and if I didn't put it what would happen then ?? thanks :) import java.util.Scanner; class Average { public static double compute(int...x) { double sum=0; for(int item:x) sum+=item; return … | |
Hi Guys! I'm having trouble on briefcases having the same value. for ex: i choose briefcase 1 = 5000, briefcase 2 = 5000 how do i make the briefcases have a unique value? Note: the value of briefcases are randomized import javax.swing.*; import java.awt.*; import java.awt.event.*; public class DoND extends … ![]() | |
help me to write java code for reading recieved packet details such as source ip,source port | |
Hi, I want to learn java as young but i use Arch linux since i was kid so how can i get the emulator or what required softwares.I have java 7 installed. Reply as soon as possible to noob guy. Thanks,uxama | |
hi everyone, im new to java. and i was assigned to do a project that integrates java and .net(c#). here's the scenario: 1. the .net system will create a text file (.txt) based on some conditions --> i already did this part. 2. the txt file will then be pass … | |
Hi, I just wanted to know about instance method? If static modifier is not applied before does it makes it an instance method ? Plz give an example Thanku | |
Hi I have a Select element in my page, It looks like this [CODE] <select name="test"> <option value="1">Hi</option> <option value="2">Hello</option> <option value="3">GoodBye</option> </select> [/CODE] Ok, don't mind the syntax or if I missed something, everything works fine, the problem is that I want to get the selected option value from … | |
hi ^_^ I want to ask what is the difference between (System.out.println(B);) and (System.out.println(new string(B));) ?! actually it gives me the same output in my code! so then >>what is the use of [new string(array)] in general ??? thank U :))) public class CopyArray { public static void main(String[] args) … | |
Hi there , We know that we can use taglibs in JSP page. Is it possible to refer tlds and its tags from the servlets. Can we have control over the taglibs in the servlet programmatically ? I googled but invain. All the results are about creating custom taglibs. Any … | |
Hi, I'm considering writing a java applet that has a chess board and lets people solve puzzles. There are chess engines that are free that could be the AI to play against and they come in executable files (console apps) compiled for both Mac and Windows. Now i have a … ![]() | |
I have generated wsdl2java code using axis 1.4 .One classes has 2 constructor methods (one default constructor and other one has 2 parameters). Other classes that inherit from one class have the constructor parameters in the wrong order.The schema files is correct as they come from the OTA specification Please … | |
I am missing something in my check sub class and I can't figure it out I know its something simple and I for the life of me can not find it. package lab61; public class AccountClass { public double annualInterestRate; public double balance; public int Id; public java.util.Date dateCreated= new … | |
everything is working fine except Encryption button. import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JTextField; public class encryption extends JPanel implements ActionListener { char [] str= {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z' }; char [] str1={'1','2','3','4','5','6','7','8','9','0','!','@','#','$','%','^','&','*','(','_','_','+','=',',','.','?'}; char [] a= new char [50]; char [] b= new char … | |
How will I create a program that compute your final grade and file which contain prelim, midterm, pre final and final grade.Create another file that contain weight for each term.(prelim=20%, midterm=20%, prefinal=20% and final=40%) | |
i am getting this error when trying to run projects 'javac' is not recognized as an internal or external command, operable program or batch file how can i fix this | |
I am new to Java language. I have been taken some personal tutorials, reading on my own and practicing by writing and solving exercise in the book I am using. Below is an exercise I am trying to solve. Question. (Find the Smallest Value) Write an application that finds the … | |
Can anyone help me how to pick all the files(many files) of some particular extention(.csv) and transferring it to remote server using Jsch channel. Please help. Regards | |
Hi, I just wanted to know about instance method? If static modifier is not applied before does it makes it an instance method ? Plz give an example Thanku | |
I am trying to make a program for my AP Computer Science A Class. I wrote the following code that is supposed to allow a user to enter two numbers and then have them guess a number inbetween that number range. So far, it works 90% of the time, but … | |
Trying to change this C++ to Java //The following pseudocode describes how to extract the dollars and cents from a //price given as a floating - point value.For example, a price 2.95 yields values 2 and 95 //for the dollars and cents. //Assign the price to an integer variable dollars. … | |
I need to get the size of a file, but I keep on getting 0 as the size, which is not the actual size. private void dodAlgorithm() throws IOException { int count; int randomValue; long fileSize; File file = new File(filename); BufferedWriter writer = new BufferedWriter(new FileWriter(file)); SecureRandom random = … | |
hey all I have a program to write and I need to use the JOptionPane dialog box to use JOptionPane to say Yes_No_Option, all I would like to know what is the code to be used , how does it work and will it work in a program. | |
hie, new to daniweb my name is christel my interests are user interface design, javascript, ajax, node.js & JSP. looking forward to putting a few java certifications under my belt this year here is my hellow world in java public class HelloWorld { public static void main(String[] args) { System.out.println("Hello, … | |
I have a JTable that a user can input data. I have an image that I would want to put at the top of my page when printed and also another image that I would want to work as footer. How do I print these on the same page including … |
The End.