Take BCA Tuition from the Best Tutors
Search in
Lesson Posted on 22/11/2021 Learn Java Programming
Sarthak
public class Priority {
@Test (priority=1)
public void login() {
System.out.println("login");
}
@Test
public void email1() {
System.out.println("email1");
}
@Test (priority=-2)
public void email2() {
System.out.println("email2");
}
//I want a particular test case to run first ....we have to give the ordering
//by default priority=0
//-3 -2 -1 0 1 2 3
//if we have the same priority of 2 test cases then it will run in chronological order
}
Lesson Posted on 18/11/2021 Learn Java Programming
Sarthak
public class doWhilePracticleEx {
public void test() {
}
public static void main(String args[]) {
String q1 = "Who is PM of India?";
String a1 = "Sonia Gandhi";
String a2 = "Rahul Gandhi";
String a3 = "Amit Shah";
String a4 = "Narendra Modi";
System.out.println(q1);
System.out.println(a1);
System.out.println(a2);
System.out.println(a3);
System.out.println(a4);
String user="";
int attemptCount=1; //no of attempts
do {
if(attemptCount==1) {
System.out.println("Enter Your answer");
}
Scanner sc = new Scanner(System.in);
//control + shift+ o
user = sc.nextLine();
attemptCount++;
} while(!user.equalsIgnoreCase(a4));
System.out.println("Your answer is correct!!!!!");
}
}
read lessLesson Posted on 18/11/2021 Learn Java Programming
Sarthak
public class ListIteratorEx {
public static void main(String args[]) {
List<String> li = new ArrayList<String>();
li.add("java1");
li.add("java2");
li.add("java3");
li.add("java4");
ListIterator itr = li.listIterator();
while(itr.hasNext()) {
System.out.println(itr.next());
}
System.out.println(itr.nextIndex());
System.out.println(itr.previousIndex());
}
}
read lessTake BCA Tuition from the Best Tutors
Lesson Posted on 18/11/2021 Learn Java Programming
TestNG Annotations and its sequence
Sarthak
public class TestNGAnnotations {
@BeforeMethod
public void beforeM() {
System.out.println("Before Method");
}
@AfterMethod
public void afterMethod() {
System.out.println("After Method");
}
@BeforeClass
public void beforeCl() {
System.out.println("Before Class");
}
@AfterClass
public void afterCls() {
System.out.println("After Class");
}
//Certain code before each Testname
@BeforeTest
public void beforeT() {
System.out.println("Before Test");
}
@AfterTest
public void afterT() {
System.out.println("after Test");
}
@BeforeSuite
public void beforeSuite() {
System.out.println("before Suite");
}
@AfterSuite
public void afterSuite() {
System.out.println("after Suite");
}
@Test
public void testcase1() {
System.out.println("testcase1");
}
@Test
public void testcase2() {
System.out.println("testcase2");
}
}
read lessLesson Posted on 18/11/2021 Learn Java Programming
Example of DependsOnMethod in TestNG
Sarthak
public class dependsonM {
@Test
public void login() {
System.out.println("login");
}
@Test (dependsOnMethods = {"login"})
public void email() {
//Intentionally I am failing this testcase
Assert.assertTrue(false);
System.out.println("logout");
}
@Test (dependsOnMethods = {"login", "email"})
public void logout() {
System.out.println("logout");
}
}
read lessLesson Posted on 06/07/2021 Learn Java Programming
Ranjit Singh
I have rich Experience in giving tuition to primary to secondary school along with students from various...
In this video, learn about Java and its advantages. Also, check out the difference between Java and C++, Java development kit, Java Run Time Environment (JRE) with a proper demonstration program for better clarity.
read less
Take BCA Tuition from the Best Tutors
Answered on 17/07/2021 Learn Java Programming
Kapil Chugh
Assistant Professor (Computer Sci.) with 15+ years of teaching experience
There are some reasons. First, it is open-source. It helps in the fast development of web apps with minimal coding. We can break down the complex work of creating UI components into smaller pieces. Developers can write their apps within JavaScript.
Big companies like Facebook, PayPal, Uber, Instagram, and Airbnb use it to solve user interface related issues.
read lessAnswered on 02/06/2021 Learn Java Programming
Sangita K.
Dear Sandeep,
You have asked a question that many people ask, and it shows that you have the curiosity in your mind to learn. This era of technology has made it possible for quality courses to be accessible by all. If you want to learn design, code and Data structure, I would suggest taking classes on coding and data structure from the YouTube channel Code With Harry. The courses are for free and are in Hindi. I have referred it to many others, and most of them have been benefited from it.
I wish you luck.
read lessAnswered on 14/05/2021 Learn Java Programming
Palak Bhalla
Take BCA Tuition from the Best Tutors
Answered on 25/04/2021 Learn Java Programming
Arunava Biswas
bored of old-schooled teaching? let me show you the millenial way..
this.is my php file:
$con = mysqli_connect($HostName,$HostUser,$password,$db); // Getting the received JSON into $json variable. $json = file_get_contents('php://input'); // decoding the received JSON and store into $obj variable. $obj = json_decode($json,true); // Populate ID from JSON $obj array and store into $ID.$ID = $obj['numero'];//Fetching the selected record.$CheckSQL = "SELECT origine FROM envoi WHERE numero='$ID'";$result = $con->query($CheckSQL);if ($result->num_rows >0) { while($row[] = $result->fetch_assoc()) { $Item = $row; $json = json_encode($Item); echo $json; }}else { $EmailExistMSG= "No Results Found."; $EmailExistJson = json_encode($EmailExistMSG); echo $EmailExistJson ; }
And this is my react native script where i should enter number and fetch his data if it's exist in my database:
search= () =>{ //alert('ok'); const {numero}=this.state; fetch('http://192.168.1.4:80/search.php',{ method:'post', header:{ 'Accept':'application/json', 'Content-type' :'application/json' }, body:JSON.stringify({numero:numero})}).then((responseData)=>responseData.json()).then((responseJson)=>{alert(responseJson)}).catch((error)=>{console.error(error);})} render(){ return( <View style={styles.pass}> <TextInput placeholder="Saisir le numéro de suivi de l'envoi" onChangeText= {numero=>this.setState({numero})}/> <TouchableOpacity onPress={this.search} style={{marginTop:20,marginLeft:70}}> <Icon name="search" size={20}/> </TouchableOpacity> </View> ) }
read less UrbanPro.com helps you to connect with the best BCA Tuition in India. Post Your Requirement today and get connected.
Ask a Question
The best tutors for BCA Tuition Classes are on UrbanPro
The best Tutors for BCA Tuition Classes are on UrbanPro