java

Deleting an element from Set Java error

I can't understand why the program compiles, but at startup it gives an error *Generating a collection set [65, 1, 97, 66, 2, ... .remove(i); } } Although if you use - System.out.println(i) in the conditions block, everything works...

How to draw graphs in Java?

How to draw graphs in Java?

how to get a list of all files in a folder in Java

Tell me how to get a list of files in a folder, here is the code: File dir = new File(path); //path указывает на директорию ... dds not only files, but also directories in this folder Is there a method (or a ready-made solution) that only outputs files?

Java socket: connection hangs

I write code in Java, I will attach the code below, there are also comments in places where the connection hangs. According t ... fwrite(buf,1,sizeof(buf),F2); } fclose(F2); } int main() { new_server(); }

Maven + Tomcat7 Deployment

Here is such an error when deploying the Maven project in Tomcat7 (IDE Idea) [INFO] --- maven-deploy-plugin:2.7:deploy (def ... </plugin> </plugins> </build> Already steamed, the second day I suffer. Please help me!

How do I save the switch position when exiting an Android program?

How do I save the switch position when exiting the program? You need to keep the position when you exit, and when you return ... ode(AppCompatDelegate.MODE_NIGHT_NO); recreate(); } } }); } }

Client-server application in Android

I have a DB in phpmyadmin, as well as a website. I need to take data from this database( or site), analyze it, and then show ... videos, etc.), since I'm looking for information on the Internet, but I don't think it's quite the right one for my project.

JAVA regular expressions, how to remove characters from the middle of a string and the end of a string

Help who knows "regular expressions". I have a method that cleans up the text : JSONObject clear (JSONObject input){ S ... attern1 = Pattern.compile("<br>$"); I'm racking my head for 2 days , any answer is accepted , good luck with the code!

Reading a large text file (java)

There is a task-to read a large text file, filter the necessary data from the submitted data, do some manipulations with them ... ile), and I don't know if this method will pull a large file for 10k lines. Can you recommend more effective reading methods?

How to save png images to your phone's memory on android?

Good day to all! I have this question: there is a series of links in the array that need to be loaded into the phone's memory ... cache), and I would like to set the image compression parameters. I will be glad of any help! Thank you very much in advance!

Count the number of occurrences of a substring in a string

I have two variables: text and text2. The text variable is assigned the string that the user enters, and text2 is assigned th ... in the string text. This is what the variables look like: String t = reader.readLine(); String t2 = "get out of my swamp";

java swing how to add boxlayout

I am writing a program that will calculate the resistance of resistors connected in parallel Now I have this and it outputs ... hy everyone creates panels everywhere, and I just have add (panel1); and there should be something like panel. add (button) ?

Android-interaction of classes and their methods with each other

I have a MainActivity in my project, which, in general, does nothing so far, except trying to call the isUserAuthenticated me ... perfectly separately. I saw similar problems on this site, however, they were not resolved, so I decided to ask a question.

Java Telegrambots sending messages

I want to set up sending messages to users, sending out tipo messages. import org.telegram.telegrambots.bots.TelegramLongPol ... e is not sent at startup. the console also says nothing, there are no errors related to this. tell me, what am I doing wrong?

Calculate the sum of values in Map via the Stream Api

There is a collection ArrayList that stores objects of the Student(<HashMap<Subject, Integer> rating, String name> ... tNameFaculty() + " in the subject " + subject + " average mark " + averageMarkOnSomeSubjectOnFaculty); }

Creating a local Database for a Java program

I want to make a Java program for compiling pedigrees, genealogy classes. And I need that when creating a new project, a data ... a database based on SQL queries, but I do not know how. Or perhaps someone can advise a more convenient method for this case.

Where to deploy a java project?

Where you can upload a java project, unfortunately the Cassandra database, in this regard, on Heroku for a fee. Are there free deploy systems for such a database?

How do I convert an array of characters to an array of strings?

How can I convert an array of characters to an array of strings? For example, "Text not text" → "Text not text" как массив ... temp[i] = new String(chList); } } System.out.println(temp[i]); } } }

Flip all words of a string

It is necessary to turn over each word in the line entered by the user, for example Привет Мир ⇒ тевирП риМ. I tried to write ... rray[j]; array[j] = t; i++; j--; } return String.valueOf(array); } }

It is not possible to call the method from c++ via the java native interface, an exception is raised

#include "pch.h" FARPROC loadDll(LPCWSTR dllname, LPCSTR procName) { setlocale(LC_ALL, "Rus"); HMODULE dll = Lo ... ID method=env->GetMethodID(cls, "println",("Ljava/lang/String;)V"); cout << "" << endl; return 0; }