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%2Fdn%2Fbse4Ul%2FbtqSEKyGnL9%2Fc7fv8TuT1rjOaDVQS6WQh1%2Fimg.png)
[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 ..