Код: Выделить всё
package com.myapp.pojo;
import com.google.gson.annotations.SerializedName;
import lombok.Getter;
import lombok.Setter;
public class Visit {
@Getter
@Setter
@SerializedName("PageName")
private String pageName;
------------------
package com.myapp.pojo;
import com.google.gson.annotations.SerializedName;
import lombok.Getter;
import lombok.Setter;
public class InsertLogResponse {
@Getter
@Setter
@SerializedName("Success")
private boolean success;
< /code>
У меня есть следующий код в другом классе < /p>
Visit visit = new Visit("tests");
String test1 = principalVisit.getPageName();
InsertLogResponse insertLogResponse = new InsertLogResponse(true);
boolean test2 = inserLogResponse.getSuccess();
Все, что я получаю, - это сообщение, которое говорит «не может найти символ».>
Подробнее здесь: https://stackoverflow.com/questions/797 ... for-others