While the violin does not have frets like a guitar, the right note is produced if the instrument is properly tuned and the string is pressed in the right position.
What string instruments have frets?
Guitars, mandolins, and banjos have frets. Frets are mounted on the long necks of the instrument. The frets help the musician playing the instrument to know where to place their fingers on the instrument. On historical instruments and some non-European instruments, pieces of string tied around the neck are frets.
What instruments do not have frets?
A violin is played using a bow, which can produce a continuous sound, (its own “sustain”), therefore there is no real need for frets, which would only get in the way of being able to move the fingers around the finger board.