java
Junit and Vintage (does not pass the test)
I have already seen a similar question and the answer to it, but I want to know what else I need to change to get rid of the ... </configuration>
</plugin>
</plugins>
</build>
</project>
How do I create a table in Oracle if it doesn't exist yet?
If you run the query " CREATE TABLE some_name", jdbc throws an exception
ORA-00955: name is already used by an existing obje ... rrorException e) {
if (e.getErrorCode() != 955) {
throw e;
}
}
Is this correct? Is there a better approach?
Android countdown
Previously, in Java, I used scheduleAtFixedRate() to count down the time
Is there anything new in Kotlin?
And is there any ... solution...
Update2
I think I understood, the second number is not the time when the timer ends, but the size of the tick?
Java. Error missing "; " after throw java. io. IOException
When I insert ; writes an error
Error:(3, 19) java: cannot find symbol
symbol: class io
location: package java
I d ... ch = (char) System.out.read();
System.out.println("Now you press " + ch + " button");
}
}
}
Translating code from Kotlin to Java
I have the code on Kotlin (Android Studio 3.5):
Class RadioPlayerActivity : AppCompatActivity() {
private lateinit var pla ... iew){
playWhenReady = false;
}
}
In the first case, the stream is played back. In the Java code-silence. What's wrong?
How do I output multiple variables to a string in java?
Let's say that in python you can do it like this:
hello = "Привет"
world = "мир"
num = 1
print("{} {}! #{}".format(hello ... s%n", "joe");
But here it is not clear why these %s and %n, as well as how to output multiple variables in a single line...
Java Socket passing a class object from the client to the server
I'm studying Java Socket and the client server part, I don't understand the moment of transferring the class object (names an ... t.flush();
}
}
catch(Exception er)
{
er.printStackTrace();
}
}
}
Is the remainder for the negative argument wrong?
Many programming languages (C, C++, C#, Java, various Pascal dialects, PHP, Javascript) have a remainder calculation operator ... = 0 0 = 0 * 3 + 0
-1 / 3 == -1 -1 % 3 == 2 -1 = -1 * 3 + 2
-2 / 3 == -1 -2 % 3 == 1 -2 = -1 * 3 + 1
, etc.
Hint in intellij idea
Please tell me how to set up the same hints in intellij idea as in Eclipse?
Strange behavior of the split method
I'm trying to split a string into an array of substrings - I found the split method. But whatever the string is initially equ ... lt = testSplit.split(".");
// по идее размер массива должен быть равен трём
System.out.println(result.length());
Result:
0
How to unzip a folder in a Java archive
There is a code that unpacks ALL folders starting from the root (in the archive), and I need to do 1 directory below, if you ... ut.close();
System.out.println("запись");
exist = false;
}
}
}
Why does it write that ResultSet is closed?
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import ja ... t.java:2741)
at org.postgresql.jdbc.PgResultSet.next(PgResultSet.java:1829)
at medeelliinsan.Main.main(Main.java:28)
Caesar's Cipher
I have recently been studying programming and the Java programming language in particular, and here I ran into a problem. The ... System.out.print(m);
}
System.out.println();
System.out.println(InputString);
System.out.println(CipherKey);
}
}
There is a desire to write a client server chat application for Android
I would like to create the application itself on Android studio. Please tell me about the technologies that should be used in ... the creation (for example. Spring) and where to place the database. Well, if it is possible to advise where to learn all this
Question about suppressed exceptions within the try-with-resources construct
Here is a quote from the book Oracle-Certified-Professiona-Java-SE-8-Programmer-Exam-1Z0-809
In a try-with-resources stat ... urs. Or is it happening? Then how to understand the output of the exception to the console? Or did I misunderstand something?
org.hibernate.AnnotationException: @OneToOne or @ManyToOne
It seems to have added @OneToMany and @ManyToOne to the link code, but for some reason it gives an error when running Spring- ... stractAutowireCapableBeanFactory.java:1792) ~[spring-beans-5.2.4.RELEASE.jar:5.2.4.RELEASE]
... 16 common frames omitted
replaceAll and backslashes
Today I was working on the problem of quotation marks in SQL queries in Java (injection) and found that in order to get \' af ... Why is this happening? I checked with System.out.println('\\');, where the console returned \, that is, the correct result.
How can I clear the cache of all apps on an Android device?
I decided to develop an app that clears the cache of all the apps installed on the device. I figured out how to clear the cache of your own application. How can I do this for the rest of the programs?
Problem with the implementation of the "Grasshopper" cipher"
Hello everyone I'm writing an encryption program. I read the data from the file, turn it into an array of bytes, divide it in ... );
a<<=1;
if (hi_bit<0) a^=0xc3;
b>>=1;
}
return c;
}
How to work in Java in Visual studio code or community
I have the latest version of visual studio code (downloaded in 2020)
I don't know how to write console programs in java using visual studio code. It's the same with Visual studio community.