32,204 Topics
| |
public class Student{ private String name; public Student(String name) {this.name=name; } public void setName(String sett){ name=sett;} public String getName() {return(name);} } public class Swaptest{ public static void swap(Student p,Student q){ Student temp; temp=p; p=q; q=temp; } public static void main(String a[]) {Student s1=new Student("John"); Student s2=new Student("Mary"); swap(s1,s2); System.out.println("s1="+s1.getName()); System.out.println("s2="+s2.getName()); … | |
Please can anyone tell me how to convert an ArrayList<Integer> to byte[] Thank you | |
I would like my vb2010 program to click on a javascript element on this webpage depending upon what they choose, here is the source of the rating system, thanks in advance: <div class="basic-info-rating basic-info-user-rating" style="display:none"> <div class="rating quick-rating"> <p class="average rating-3">3 stars</p> <ol class="user" data-analytics='{"click_id":1865,"events":"event6,event7,event24"}' data-ypid="5550608"> <li class="rating-1"> <a data-analytics='{"rating":1}' … | |
hi all, Good noon. I am trying to get the match a key word from text, get the input from text and if the match in the text matches with the input. I need to get the result of that. If the word starts in the middle i should not … | |
trying develop a Russian/English Flag game, given the flag image you choose in Russian or in English modes... Since English country names get from country file image names, can have a Java generic Map key=englishCountryName & value=inRussianEquivalent.... to do the Russian part??? Or exist other way? if you think this … | |
Hi guys, i'm trying to program a simple Tic-Tac-Toe game with extern Buttons. When i'm compiling the Code there's no mistake, when i press Button1 every thing ok, but on the most other Buttons a mistake is shown up : Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at grafik.Zeichenfenster.farbeAufloesen(Zeichenfenster.java:330) at grafik.Zeichenfenster.zeichnen(Zeichenfenster.java:276) at … | |
import java.util.*; public class EmployeeTest { public static void main (String[] args) { Employee[] staff = new Employee[3]; staff[0] = new Employee("Carl Cracker", 75000, 1987, 12, 15); staff[1] = new Employee("Harry Hacker", 50000, 1989, 10, 1); staff[2] = new Employee("Tony Tester", 40000, 1990, 3, 15); for(Employee e : staff) e.raiseSalary(5); … | |
Is there a way to convert a double to string. I tried to do it like this x.toString() and it didnt work as well as implicitly converting it. | |
Why the method of the following class is getting invoked several times even if the condition is false.Please help me with my code... public class PRDDayBook { int remX; public PRDDayBook(int x) { remX = x; PrinterJob pj = PrinterJob.getPrinterJob(); PageFormat pf = pj.defaultPage(); Paper paper = new Paper(); double … | |
how to get refrence of notepad what we havae created using runtime class.,,as i want to write data on that notepad what i m reading from another notepad..can i have an example.? | |
Please how do I convert a string of hexidecimals “10B71356C845FB08E04951AAA2FF9F49” to integer? I tried using getBytes then Integer.valueOf but I got 32 integers instead of 16. Any help would be greatly appreciated. Thank you. | |
hi... I want to write a program which will find out the complexity of a given program or code given as a input through file...... plz help me..... | |
> Quoted Text Here i got this code from a book i am practicing with and when i try to compile it returns the following error EmployeeTest.java:30: incompactible types found : java.util.Date required: Date hireDay = calendar.getTime(); please how do i debug it import java.util.*; public class EmployeeTest { public … | |
I am not able to figure out what's wrong with the following code: Is it a rule to create objects in class that contains main method and then use this object to access the methods? I did exactly reverse in the following code and i am not able to compile … | |
hi all, This is my first post in this site. I have a sentence like this String input = "India/world is my Country and it is in Asia/in world"; I want to remove the word followed by the / and get the result of otheres. Output **India is my Country … | |
Hi I have a program that I am to write that is suppose to read from a text file. I am suppose to assume no more than 100 item and terminate after by -1. have to read and store the data. I have to write a method to print the … | |
Hi There, please guyz, can I please have The code that generates student's code using the first letters of their Names. | |
Hello everyone, I progress step by step my problem, one step is passed -now I can send string datas -text messages- here another step is I want to record some audio sounds by using microphone in first android emulator assume phone1 and send to second android emulator-phone2-. I found whole … | |
how to convert truststore file into .cer file by using ssl tool | |
I'm trying to learn Java, pretty easy so far as my previous experiance is with C/C++. I was just curious how to call java classes from different files. That way I don't have to have main as well as all of my classes crammed into one file. I'm sure the … | |
Please I am relatively new to Java and would really appreciate your help. Can anyone please tell me what I am doing wrong. I'm trying to send a string to an oracle and save it's output. My program just hangs when I get to this block of code. try { … | |
I have to write a program in java to compute the standard deviation and the mean. I am also to write a test program that will prompt the user to enter 10 numbers and display the mean and standard deviation. I have stared on the program and so far this … | |
Hi, Im working on a html5 parallax site. I have a problem with the javascript, that it is not detecting the screen resoultion thought I have right css files in my folder. My js detects for one type of screen resolution but it is not detecting the remaining screen types … | |
Hi this is a PSEUDOCODE. I don't know if is the right place to ask. Can someone takes a look of my pseudocode? I am not sure if I understood the assignment. Thanks! Equinox Nursery maintains records about all the plants it has in stock. The nursery needs a program … | |
I Want to draw a grid over image that is set or loaded on to a JLabel ,,,,,, when i draw a Grid it push the image forward on JLabel and take place of that image on JLabel ,,, | |
I initialize the selenium like [CODE]public void setUp() throws Exception { setUp("http://localhost/", "*firefox"); } [/CODE] and I write my test in the method like [CODE]public void testUntitled() throws Exception { boo(); foo(); }[/CODE] But it gives error like [CODE]java.lang.RuntimeException: Could not start Selenium session: Failed to start new browser session: … | |
Hi I am new in this forum. I need some help with this code and is for my intro to programming class. I did it following a pseudocode I found in other website but I am totally confused now. It is not working. Do nothing. Thanks This is the assigment … | |
I have one CSV file containing so many attribute but i want max and min values of particular specified columns. I have write following code for finding minimum value from each specified column,but i got only minimum of last column, not all column. In dataset.csv file contains 25,185,98,65 15,-20,6,95 17,20005,63,-78 … | |
Dear all, I have one question arise in my mind while i am making my project. I have one column "AGE" is there.So many values are stored in this column ranging from 0-100. I also have find frequency of each age like age=5 comes how many times in my column … |
The End.