Quantcast
Channel: BlogoSfera » call
Browsing latest articles
Browse All 35 View Live

ArrayList size shrinking by 1 upon each method call [duplicate]

This question already has an answer here: Is Java “pass-by-reference” or “pass-by-value”? 55 answers Quick question. I am currently making a synthetic division calculator and as a part of that I need...

View Article



Special characters in Java. Can you use single quotes in this printf method...

I’m reading a textbook on Java and I encountered this passage. I had some questions. First, here are some special escaped characters that the book mentions. ’\n’ the newline character ’\t’ the tab...

View Article

Execute jdbc call in spring mvc

In spring mvc when i execute the following command it shows error. Map<String,Object> out = simpleJdbcCall.execute(in); The error is : java.lang.NoSuchMethodError:...

View Article

How to call a method in an If-statement inside an If-statement? (JAVA)

here’s my code: import java.util.Scanner; class test { public static void main(String[]args){ Scanner in=new Scanner(System.in); System.out.print("Enter disc to move: "); int disc=in.nextInt();...

View Article

when calling a jframe class the second time it duplicates it but with no...

hello everyone i’m currently working on a school project and i’m experiencing a problem that occurs when i call a jframe class, whenever i call the simSimi.java in mainMenu.java at first it will call...

View Article


call to web API from browser not working with Async action

I have created a web API that have the below async action [ActionName("getFedCust")] private async Task<HttpResponseMessage> getFedCust() { using (var client = new HttpClient()) {...

View Article

How do I escape the @ sign in Rythm?

I am using Rythm (yup no h), a Java template engine. The idea is to replace placeholders in a template file (e.g. a text file). In my case I am dealing with JSON. To call the Rythm engine I only need...

View Article

Overloaded function call choosing (int) over (Short) with a short parameter...

My class is as follows: public class Test1 { public static void go(Long n) { System.out.println("Long "); } public static void go(Short n) { System.out.println("Short "); } public static void go(int n)...

View Article


Why is this code thread safe?

I am preparing for the OCP exam and I found this question in a mock exam: Given: class Calculator { private AtomicInteger i = new AtomicInteger(); public void add(int value) { int oldValue = i.get();...

View Article


long polling implementation in java

I have implement a long poll implementation. What happening is, when the request comes i check whether some data is available and if not sleep the thread and recursively call the method till data is...

View Article
Browsing latest articles
Browse All 35 View Live




Latest Images