Quantcast
Browsing latest articles
Browse All 61 View Live

Cannot find the error with my 2D array java code

Java says that there is an expected “]” error. I cannot find what is wrong with my code? The Song class is another class composition class and there is no problem with that. thanks in advance for help...

View Article


Check length of an array and check if HashMap key is in the HashMap (Java,...

I’m trying to do some error trapping. The error should check if the length of the array is less than 2 and check if the HashMap contains a key that the user has typed in. The trapped error must use if...

View Article


Understanding a* for Java / processing

I am trying to learn the a* algorithm, the Dijkstra one too. Yesterday I found a working example for processing, which I thought was easily coded. I looked at the content of the project but i didn’t...

View Article

Sifting needle (String array) through haystack (larger String array) in Java

I need to return the index position of where in the haystack array the needle array occurs and -1 if otherwise. For example if String haystackArray = [red, blue, green] and String needleArray = [blue,...

View Article

Why my server receive nothing from client? [duplicate]

This question already has an answer here: new ObjectInputStream() blocks 1 answer I am trying to send an object an a file from client to server and then the server response the client. The client does...

View Article


HashMap error in forloop [on hold]

I wanna try login by sending user values in a hashmap String[] name = {"Superman", "Batman", "Spiderman"}; String[] pass = {"abc", "123", "okc"}; HashMap<String, String> hm = new...

View Article

ArrayIndexOutofBoundException Error [duplicate]

This question already has an answer here: What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? 7 answers I’m trying to create a Java program to calculate the mean and...

View Article

JAVA – How to get annotations from Annotation?

I want to get annotations from annotation, but the weird thing is I can’t get single annotation from annotation instance. How do I solve this? I want to get annotations from this annotation instance....

View Article


Java – How to get annotations from Proxy class?

I’m not really familiar with proxy class and I have no idea how does this(“annotation”) became a proxy object. Can I retrieve annotations from Proxy object? public static void test(Annotation...

View Article


Efficient way to pixelate an image by manipulating pixels

I made two methods for a class called Picture, the name is self explanatory. The getAverageColor() method gets the average color of all the pixels in a certain area of the image specified by the...

View Article
Browsing latest articles
Browse All 61 View Live