Ad
  • Custom User Avatar

    Are you sure? It does when I do it.

    I don't see any reason why it should be any different.

    public class SumSquaredDivisors {
      public static String listSquared(long m, long n) {
        System.out.println("testing123");
        return "";
      }
    }
    

    outputs

    test1(SumSquaredDivisorsTest)
    testing123
      expected:<[[[1, 1], [42, 2500], [246, 84100]]]> but was:<[]>
      
    test2(SumSquaredDivisorsTest)
    testing123
      expected:<[[[42, 2500], [246, 84100]]]> but was:<[]>
      
    test3(SumSquaredDivisorsTest)
    testing123
      expected:<[[[287, 84100]]]> but was:<[]>
    

    Maybe the problem isn't in the println itself.

  • Custom User Avatar

    System.out.print("hello"); and System.out.println("hello"); should work in Java without importing.