This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CastUsage2 { | |
public void useClass(SomeInterface input) { | |
((BaseClass)input).baseClassMethod(); | |
input.someInterfaceMethod(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CastUsage { | |
public void useClass(BaseClass input) { | |
input.baseClassMethod(); | |
((SomeInterface)input).someInterfaceMethod(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BaseClass { | |
public void baseClassMethod() { | |
/* Some implementation */ | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface SomeInterface { | |
public void someInterfaceMethod(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class GenericUsage { | |
public <T extends BaseClass & SomeInterface> void useClass(T input) { | |
input.baseClassMethod(); | |
input.someInterfaceMethod(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.khroliz; | |
import net.yandex.speller.services.spellservice.*; | |
import java.util.List; | |
public class WebServiceUsage { | |
public static void main(String[] args) { | |
SpellService service = new SpellService(); | |
SpellServiceSoap port = service.getSpellServiceSoap(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
assertTrue(someBooleanValue, "Some boolean value is not true as expected"); | |
assertTrue(!someBooleanValue, "Some boolean value is not false as expected"); | |
assertTrue(someObject != null, "Some object is null as not expected"); | |
assertTrue(actualStringValue.equals("Expected String Value"), "Some string is not as expected"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
assertTrue(someBooleanValue, "Some boolean value is not true as expected"); | |
assertFalse(someBooleanValue, "Some boolean value is not false as expected"); | |
assertNotNull(someObject, "Some object is null as not expected"); | |
assertEquals(actualStringValue, "Expected String Value", "Some string is not as expected"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select order_id from orders where funny_order = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select * from ( | |
select order_id from orders where funny_order = 1 | |
order by dbms_random.value | |
) where rownum = 1; |
OlderNewer