Possibly the start of black beard algae (BBA) and common on slow growing plants like Java fern. Very difficult to get rid of. It may be caused by too much light, and/or water pollutants. It could have already been on the plant when it was bought.
Bear in mind, Java ferns also reproduce by growing tiny plantlets off the edges of the wide leaves. Sometimes this makes the edges look weird.
Make sure you have plenty of water movement and excellent water conditions.
The internet has plenty of detailed info on BBA.