java static error
![[VS] Cannot make a static reference to the non-static method ..... from the type ... Java(603979977)](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdna%2Fbse4Ul%2FbtqSEKyGnL9%2FAAAAAAAAAAAAAAAAAAAAADQ8nUum3PsOO59IGcNNQ1raenKJscwlSZ9T5h5LX_ku%2Fimg.png%3Fcredential%3DyqXZFxpELC7KVnFOS48ylbz2pIh7yKj8%26expires%3D1756652399%26allow_ip%3D%26allow_referer%3D%26signature%3DFZn%252FOVodMKn79qCtKie8btFTuxI%253D)
[VS] Cannot make a static reference to the non-static method ..... from the type ... Java(603979977)
Cannot make a static reference to the non-static method ㅁㅁㅁ from the type ㅁㅁㅁJava(603979977) static 으로 동일 하게 맞춰주면된다. 코드로 보면 이해된다. public class Compressed { public static void main(String[] args) { System.out.println("Hello"); String show = "abbccccc"; System.out.println(compress(show)); } String compress(String str) { StringBuilder compressed = new StringBuilder(); int countConsecutive = 0; for ..