- Strength to Increase Rep
- +4
- Strength to Decrease Rep
- -1
- Upvotes Received
- 6
- Posts with Upvotes
- 6
- Upvoting Members
- 6
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Re:
I thought that setting up the PATH variable was a must if we wanted to use java or javac commands on linux (preferably in the bashrc file), but I am able to use these commands anywhere without setting up the PATH variable.. Similarly, without specifying '.' in the CLASSPATH variable … |
|
Re:
I am a recent immigrant from c++ to Java. I have this problem: I have an array of objects (not yet initialized using the new operator), that I need to pass to a member function of another class for storage. In c++ I would have made a pointer to the … |
|
Re:
hi at all, i'm wirting a program (a chat) to connect two process via socket using ssl connection. In order to make portable this chat i've written a single body formed by two threads, the first has a client behaviour (users can connect to other users) and the second thread … |
|
Re:
please tell me the answer of this question.it is irritating me a lot. i have searched many books but not getting it.please help!! |
|
Re:
I was asked to write a program, based on parent-child cooperation, which uses a “parallel” merge sort to a sequence of 800 numbers from a text file.I have to read the sequence of 800 integers, which I store in an array, and then pass half of them to a child, … |
|
Re:
Hi guys, I want to find the sum of numbers(inclusive) between TWO integers inputted by user. Example: if user enters 1 and 4, then it outputs: Sum = 10 I just started my code: [CODE]public static void main(String[] args) { int number1 = 0,number2 = 0,Sum = 0; Scanner input … |
|
Re:
[CODE] [1]class A{ [2]public static void main(String...agrs){ [3]String str1="ABC"; [4]String str2="ABC"; [5]String str3=new String("ABC"); [6]} [7]} [/CODE] How many objects are created at each line and finally at line 7? |
|
Re:
So I'm creating a program that calculates the “Sum of Powers” after the user inputs two integers N and M. The sum of powers is computed as N^M+ N^(M-1)+ N^(M-2)….+N^0. But I don't know how to finish it. I'm kinda confused using return method, loops, etc. Here's what I have … |
|
Re:
Hey all, I'm having some issues using ArrayList. Here's the code.. [CODE] ArrayList<Double> var = new ArrayList<Double>(); var.add(15.0); var.add(0.0); [/CODE] I could just use [CODE] double[] var = {15.0 , 0.0}; [/CODE] for this.. but I'm trying to teach myself Java and need to understand the use of ArrayList. Any … |
|
Re:
My computer science teacher stinks. He'll give us the book to read (the book sucks and doesn't explain anything) and gives us a quiz on stuff without even explaining it. I love programming but this class is discouraging me. What should I do on my own time to improve my … |
|
Re:
Hi, i'm trying to use regex to delete lines which starts with a letter or a number. for example: if i have a text file with many lines and i want to delete every lines which starts with S and 2. What operator do i have to use? i tried … |
|
Re:
A typical computer memory can be viewed as an array of locations. At each location, a binary sequence of fixed length can be stored. Assume that the fixed length is 24. For each of the following encoding schemes, provide the value of the largest unsigned integer that can be represented … |
|
Re:
If Binary sequence = 01100001000010 then how do i interpret this as an unsigned base-2? [B][COLOR="Red"]Please Help Tank You[/COLOR][/B] |
|
Re:
OK, here's what I want to do (I realize the code below doesn't work, but it's what I would LIKE to do). I've converting things from C++ [code=JAVA] public void ChangePrimitiveArray(byte bytes[]) { bytes[0] = 1; } public void foo() { byte bytes[] = new byte[2]; bytes[0] = 4; ChangePrimitiveArray(bytes); … |
|
Re:
ok so the program gets a list of numbers, and it counts how many times a number is entered. [CODE]for(int i = 0; i < numList.size(); i++){ for(int j = numList.size() - 1; j > i; j--){ if(numList.get(i) == numList.get(j)){ count++; numList.remove(j); } } System.out.println(numList.get(i) +" " + count); count … |
|
Re:
Stuck on trying to limit a persons name to say 20 characters in a string or a phone number to 6 characters in a string, i cant get the {} inside or after regex to work with either a minimium or maximium number so that in my loop if a … |
|
Re:
hai friends, How can i comiple and run java program using java code(with out using batch file) plz any one help me in t \his. |
|
Re:
May I know how to find the largest number in an array? |
|
Re:
I am trying an example from my CS class. We learned recursion recently, and one of the examples I was given was to reverse a given string. The Java program compiles correctly, but when it is actually executed, instead of getting the intended result, I get this as my outcome. … |
|
Re:
Hi, I am studying algorithms and how efficient they can be. So I have a question concerning merging of linked lists. If I have two linked lists. One is double the size of the other. And and larger one is sorted, where as the smaller one is unsorted. Is there … |
|
Re:
Hello everyone! I am John and Im 13 years old. I was always wondering if the Computer Science field was good to major in. I would like to kind of get is jist of how much they make. Also, what would be helpful if you could tell me some classes … |
|
Re:
Why Animal constructor is not being called by the declaration of the array? LINE 12 Isn't 10 instances of Animal class is being created with this line? [CODE]package javaapplication; class Animal { Animal() { System.out.println("Animal Constructor");} } public class Main { public static void main(String[] args) { Animal[] animal_obj = … |
|
Re:
Hello, When random generates an output, it cannot show duplicate strings. So for example the output I am getting (randomly) is, "Freddy, Freddy, Jane" when it should be "Freddy, Jane". I have to hardore so I cannot use Sets or ArrayList, Contains or for anything like that. Also no Stringbuilder. … |
|
Re:
I am not familiar with linked list, can any one help? |
|
Re:
Hello, I am having trouble writing to a file from an applet (in a local directory) without totally demolishing the file and erasing it's contents (okay, maybe I am exaggerating on the [I]destroying[/I] part :P, but it does erase it!). Also, I just can't make the applet [I]write[/I] to the … |
|
Re:
EDIT: This was moved from the Java discussion forum. It seems more appropriate to post it here. This is not exactly a homework assignment. I'm just doing it for fun ^^ Hey guys. I am currently just a 11th grade student but since I'm done the whole curriculum for my … |
|
Re:
Hi, So I'm new to C and I'm trying to get the max temp from my user input and the print out in a table the temperature's from 0 to max temp in celsius and fahrenheit. However I can't seem to get the maxtemp from my getinput function. I was … |
|
Re:
Hello All, I came across a question wherein I need to find an element in the array.However, it's given that the array has been rotated many number of times and initially the array elements were sorted in an increasing order.I just wanted to know what is meant by rotating an … |
|
Re:
For my Programming class I have to write a program to get the Date and time from a Daytime protocol server. If you don't know, the format for the Daytime protocol is as follows: [code]JJJJJ YR-MO-DA HH:MM:SS TT L H msADV UTC(NIST) *[/code] YR being the last two digits of … |
|
Re:
hi, this is something i keep running into. for example, in the following example of strtok, i'm splitting a given string on a space(" ") delimiter: [code] #include<stdio.h> #include<string.h> int main() { char str[]="1234563 34 7898"; char delim[]=" "; char* result=NULL; char new[15][3]; int i=0; int j=0; bzero(new, sizeof new); … |