Hey guys , I am having a problem with my code , consider this problem:
Write a method compressDuplicates that accepts a stack of integers as a parameter and that replaces each sequence of...
Type: Posts; User: Jad_Asmar
Hey guys , I am having a problem with my code , consider this problem:
Write a method compressDuplicates that accepts a stack of integers as a parameter and that replaces each sequence of...
Thank you , thank you , thank you.
You sir have made my day ! :D
The length of the keys in the picture that i attached is 6 , but the length or ( count ) of the values is 4 .
If you use map.size(); a value of 6 will be returned .
What can i code or what can i...
It is very simple , map.size() will give us the length of key from the HashMap , i just want the length of the values not the keys.
Here i sketched this :2831
Thank you for your reply,
What I meant is that in my assignment the first question asked is " what is the number of the tags of the novel ?" and by tags i mean " Location " or "Person"...
The keys...
You are trying to compare a string with the compare method of two integers , if you had like:
int A =1 ;
int B=2;
here you can use if(A==B)
return true;
However when...
Hello guys , I am asked in my assignment to make a program that accepts a text file as an example a novel and i have to sort each word as a PERSON or ORGANIZATION or LOCATION or O as in Other ,...
you just switch the "returns" anyhow here's the code :
public class test2 {
public static void main(String[] args) {
double[] crazy = { 1.0, 2.0, 2.5 };...
I get it , thank you guys for your help :)
Ok i got it all right now but i do have another question , take a look :
public class test2 {
public static void main(String[] args) {
double[] crazy = { 1.0, 2.0, 2.5 };...
Thank you for your help guys but i'm sorry i still am a beginner to java can you explain more to me? And help me to solve my problem ? Thank you.
I am making a program that if the user enter a sequence of double in an array if it is sorted right the prog will return true if not it will return false .. what is wrong here ? always i get true.
...
" one of the String class's "
could you give me an example ? and are you sure it's the best way that is to divide the lines in lines ? Consider the file is too large isn't it wrong to consider...
Good morning , i am writing a program that will wait for the user to enter a molecule , lets say he enters " h20" the program will go to a file search for the word and puts the weight name .. into an...
Good evening everyone,
i want to make a program that read a list of integers as an array then prints the reverse of it however these integers should be passed as command line arguments but my...
The problem is that i get no output , i know how to use arrays.ToString but the problem is i get no output.
Good evening everyone , I am curently having problem since i want to make a basic program which basically reverse all the numbers of a certain array into the same array , by that i mean i want to...
It's because you are not saving the variables that the user is typing try as an example
int input=console.nextInt;
--- Update ---
Oh sorry since the user will put many integer example :25 65...
Yes i am aware of these facts that integer divided by an integer will result an integer but if a double divided by an integer will result a double , however i treid setting all of my int to double...
Thank you Christopher , but the thing is I would like to create an array but randomly and by that i mean it can be 4 arrays 5 or 6 up to 10 ; that's what i want .
To make it clear my whole program...
Yes I do like a longer answer , and sorry for posting my thread titled " Easy " will be making sure next time to write my title better.
Would you please tell me why my output is always 0.0 ? i want my program to print the sum of the values that are less than the average of all of the values generated .
import java.util.*;
...
Oh god , what a foolish mistake , thank you !
Good evening everyone ,
I am writing this post to ask you guys if you can help me on this very basic program .
I am still a student in programming and a beginner with arrays and i am asked to...