ok, I have the method modify in Wiki class
public synchronized void modify(String fileName, String newContent) throws Exception
{
if(!repository.containsKey(fileName))
throw new...
Type: Posts; User: r0x
ok, I have the method modify in Wiki class
public synchronized void modify(String fileName, String newContent) throws Exception
{
if(!repository.containsKey(fileName))
throw new...
ok thank you all for replies but is any solution to my question ?
how user2 can access file1 and modify it concurrently with user1 ?
import java.io.File;
import java.util.Calendar;
@SuppressWarnings("serial")
public class TxtFile extends File implements Cloneable
{
//Name of File
private String fileName;
//Code
ok, I can declare file variables even before user1 thread and it will be accessible by user2 BUT it would mean that user1 didn't create any files, and I want that user1 creates file1 & file2 inside...
Hello, I'm stuck a little bit with the following code. What I want is that user2 is able to modify as well the file1, so that was the point of the exercise to show efficient concurrent access to the...