0

I have this piece of code:

public Paragraph paragraph() {
    Paragraph paragraph = new Paragraph(before.getLeading());
    paragraph.add(before);
    if (numbered) {
        paragraph.addSpecial(new Chunk(String.valueOf(pageN), before.getFont()));
    }
    if (after != null) {
        paragraph.addSpecial(after);
    }
    paragraph.setAlignment(alignment);
    return paragraph;
}

Compiler is saying that in the 2nd line I have this error:

reference to Paragraph is ambiguous, both method Paragraph(float) in Paragraph and method Paragraph(Chunk) in Paragraph match
Daniel Waechter
  • 2,574
  • 2
  • 21
  • 21
Jamal
  • 27
  • 2
  • 6

0 Answers0