How to print a char a certain number of times?

Java
I am trying to create code that takes a user-inputted number, and store it as an int. I then print out 'int' number of lines, with 'int' number of 'ch...
3 years ago

How to draw a line that connects two circle outlines without using sin or cos functions in Android?

Java
Question is how to draw a line between two circles, but from the outline not from the centers? And so that line would be the shortest path between the...
3 years ago

Java: Why does the compiler complain here?

Java
0 int specialFuncStart; 1 String[] specialFunctions= {"sum","ddx","integral"}; 2 for(String element: specialFunctions...
3 years ago

Can't start Eclipse - Java was started but returned exit code=13

Java
I am trying to get my first taste of Android development using Eclipse. I ran into this problem when trying to run Eclipse, having installed version 4...
3 years ago

is Thread.sleep() guaranteed to wait?

Java
Consider this scenario: I want to make several web service calls consecutively. I am only allowed to make a call every 10 seconds. I have something li...
3 years ago

NullPointerException when Creating an Array of objects

Java
I have been trying to create an array of a class containing two values but when I try to apply a value to the array I get a NullPointerException. pub...
3 years ago

Determine which .jar files are used

Java
I have a program that will not compile due to certain libraries not being found. I have tried using the -cp %pathTo\lib%/* command to include all .jar...
3 years ago

How to raise an error in Java?

Java
All the googling I've done seems focused on "catching" errors. I want to be able to raise my own if certain conditions are met. I tried using the Erro...
3 years ago

Scanner.nextLine(); called before wanted due to loop

Java
I have a scanner input which is called by getName() in my Player class. public static String getName() { System.out.println("Enter your character's...
3 years ago

Reading an Array List (Java)

Java
I am trying to take input from a user and then sort that input into an array. The input must either be an int, double, or string. All I have right n...
3 years ago

How can I separate a single String into two parts?

Java
I have a text document that consists of a number of lines, each of which has a username, a comma, and a password. For example, Joe, pass1 Sally, badp...
3 years ago

SmartGWT ComboBoxItem get all Records

Java
How can I get all Records from a SmartGWT ComboBoxItem? I add the Records as a Datasource. Did not found any way to retrive all Records. Thank you i...
3 years ago

What does Java `this` actually refers to in an inheritance situation?

Java
Why does the following Java code produces: 10 superclass The code in question is: class SuperClass { int a; public SuperClass() { ...
3 years ago

Inserting a value into a URL in android studio?

Java
I sent data from Activity A to Activity B through means of an intent. I then extracted the results of the intent via the following. String IdString...
3 years ago

Java executors: how to be notified, without blocking, when a task completes?

Java
Say I have a queue full of tasks which I need to submit to an executor service. I want them processed one at a time. The simplest way I can think of...
3 years ago

Java equivelent to string.format() in python

Java
I want to print something like a chart with minimum space in each block and a certain alignment to the space it takes up. Let's say I had a chart in p...
3 years ago

Failed messages: javax.mail.MessagingException: can't determine local email address

Java
Hello i keep getting this error after following a tutorial when trying to send SMTP emails using spring boot. Failed messages: javax.mail.MessagingExc...
3 years ago

How to print an array till there are values.Not the full array?

Java
I have declared an array a of type int with size 100.After some operations that array contain some values.All the 100 positions doesn't have values.So...
3 years ago

@AfterThrowing not work as expected

Java
I want to use AOP to intercept all runtime exceptions thrown in service layer and rethrow as domain exceptions. @Aspect @Component public class Excep...
3 years ago

store object in ArrayList using another class

Java
This is the first code: public class Person { private int age; private String name; public Person(String name,int age){ this.age...
3 years ago