ORA-29536 przez operator AND

0

Witam, próbuję skompilować klasę java w oracle i wyskakuje błąd: "Badly formed source". Przypuszczam, że to przez operator && w pętli while, jeżeli tak to czym go zastąpić? oto kod:

 create or replace java source named sKMP as
  class cKMP{
	public static int[] tablica(String wzorzec)
	{
		String p = wzorzec;
		int m=p.length();
		int[] b = new int[m+1];  
	    int i=0, j=-1;
	    b[i]=j;
	    while (i<m)
	    {
          while(j>=0 && p.charAt(i)!=p.charAt(j)){
            j=b[j];
          }
	        i++; j++;
	        b[i]=j;
	    }
	    return b[i];
	}
};
 
0

RESZTA KOMUNIKATU BŁĘDU

0
 
Error starting at line : 2 in command -
create or replace java source named sKMP as
  class cKMP{
	public static int[] tablica(String wzorzec)
	{
		String p = wzorzec;
		int m=p.length();
		int[] b = new int[m+1];  
	    int i=0, j=-1;
	    b[i]=j;
	    while (i<m)
	    {
          while(j>=0 && p.charAt(i)!=p.charAt(j)){
            j=b[j];
          }
	        i++; j++;
	        b[i]=j;
	    }
	    return b[i];
	}
};
Error report -
ORA-29536: badly formed source: Encountered "qwecharAt" at line 11, column 22.
Was expecting one of:
    "instanceof" ...
    ")" ...
    "<" ...
    "?" ...
    "==" ...
    "<=" ...
    ">=" ...
    "!=" ...
    "||" ...
    "&&" ...
    "++" ...
    "--" ...
    "+" ...
    "-" ...
    "*" ...
    "/" ...
    "&" ...
    "|" ...
    "^" ...
    "%" ...
    ">" ...
    "=" ...
    "*=" ...
    "/=" ...
    "%=" ...
    "+=" ...
    "-=" ...
    "<<=" ...
    ">>=" ...
    ">>>=" ...
    "&=" ...
    "^=" ...
    "|=" ...
    "<<" ...
    "." ...
    "[" ...
    "(" ...
    
29536. 00000 -  "badly formed source: %s"
*Cause:    An attempt was made to create a Java source object with text
           that could not be parsed adequately to determine the class(es)
           defined by it.
*Action:   Correct errors in source.
0

przede wszystkim to zwracasz inta

return b[i];

a w naglowku metody masz tablice intow public static int[] tablica(String wzorzec)

0

Problem rozwiązany :) Wystarczyło załadować klasę poprzez loadjava, żadnych błędów.

1 użytkowników online, w tym zalogowanych: 0, gości: 1