Posts

 What is mean by java ? Java is a high-level, object-oriented programming language originally developed by Sun Microsystems (now owned by Oracle Corporation). It's known for its platform independence, which means Java programs can run on various operating systems without modification, thanks to the Java Virtual Machine (JVM). Java is widely used in web development, mobile app development (Android apps are primarily written in Java), and in many other software applications, making it a versatile and popular programming language. Java has several advantages, including: 1. Platform Independence: Java applications can run on any platform with a Java Virtual Machine (JVM), making them platform-independent. 2. Object-Oriented: Java is an object-oriented programming language, which promotes modular and maintainable code. 3. Strong Standard Library: Java offers a robust standard library that simplifies common tasks like I/O, networking, and data manipulation. 4. Portability: Java bytecode ...

Cube

 Java cube program. import java.util.Scanner; public class CubeCalculator {     public static void main(String[] args) {         Scanner scanner = new Scanner(System.in);         System.out.print("Enter a number: ");         double number = scanner.nextDouble();         double cube = Math.pow(number, 3);         System.out.println("The cube of " + number + " is: " + cube);     } }

Web Technologies -||Tybcs imp questions

WT Technologies -|| Q1 what is the purpose of post and get methods  Ans:-Get and Post methods are the HTTP request methods used inside the <form> tag tpo send form data to the server.  Q2)Which file is used to configure the behaviour of PHP. Ans:-php. ini. Q3)Define Sticky form. Ans:-A sticky form is simply a standard HTML form that remembers how you filled it out. Q4)What is use of trigger-error(). Ans:-To register your own callback function which either logs or emails the error codes to you, and echo a simple friendly message to the user. Q5)Define session. Ans:-A session is a way to store information (in variables) to be used across multiple pages. Q6) Enlist techniques for maintain the state . Ans:-•Session. An important technique to maintain state. •Cookie. One of the smallest but important parts of the ASP NET, it is used to store the session and application information of the user. •Control State. •Hidden Field. •Viewstate.  •Query String. Q7)What is simple X...

Imp questions Cc

  Q1)Define the term lexeme. Ans:-Lexemes are the character strings assembled from the character stream of a program. Q2)List the phases of compiler . Ans:-•Lexical Analysis. •Syntactic Analysis or Parsing. •Semantic Analysis. •Intermediate Code Generation. •Code Optimization. •Code Generation. Q3)Define Cross compiler? Ans:-A cross compiler is a compiler capable of creating executable code for a platform other than the one on which the compiler is running. Q4)State any two functions of lex library. Ans:-Invokes the lexical analyzer by calling the yylex subroutine. Returns the value 1 when the end of input occurs. Appends the next matched string to the current value of the yytext array rather than replacing the contents of the yytext array. Q5)Define SDD(Syntax Directed Definations). Ans:-A context-free grammar in which. each grammar symbol X is associated with two finite sets of values. Q6)Which parser is most powerful parser in bottom up parser? Ans:-LR Parser. Q7)Define the term...

What is the collection

  In Java, a collection is an object that represents a group of elements. It provides a way to store, manipulate, and access a collection of objects in a unified manner. The Java Collections Framework provides a set of interfaces and classes that define various types of collections and the operations that can be performed on them. The key interfaces in the Java Collections Framework are: 1. Collection: It is the root interface that defines the basic methods that all collections should have, such as adding, removing, and querying elements. 2. List: It is an ordered collection that allows duplicate elements. Lists can be accessed by their index and provide operations for adding, removing, and modifying elements at specific positions. 3. Set: It is a collection that does not allow duplicate elements. Sets are often used to represent mathematical sets and provide methods for adding, removing, and testing the presence of elements. 4. Map: It is an object that maps keys to values. Each k...

WT slip tybcs21to30

 @Slip-21 Q. 1)Add a JavaScript File in Codeigniter. The Javascript code should check whether a number is  Positive or negative.  Ans: Html file <!DOCTYPE html> <html>    <head>       <title>Number Check</title>       <script src=”<?php echo base_url(‘js/numberCheck.js’); ?>”></script>    </head>    <body>       <h1>Number Check</h1>       <p>Enter a number to check:</p>       <input type=”number” id=”num” />       <button onclick=”checkNumber(document.getElementById(‘num’).value)”>Check</button>    </body> </html> Create is file check number.js Function checkNumber(num) {    If (num > 0) {       Alert(“The number is positive.”);    } else if (num < 0) {       Alert(“The number...

Java

@@1@@  public class demo extends Thread { char c; public void run() { for(c = 'A'; c<='Z';c++) { System.out.println(""+c); try { Thread.sleep(3000); } catch(Exception e) { e.printStackTrace(); } } } public static void main(String args[]) { demo t = new demo(); t.start(); } } Write a Java program to accept the details of Employee (Eno, EName, Designation,Salary) from a user and store it into the database. (Use Swing) @@@2 Write a java program to read ‘N’ names of your friends, store it into HashSet and display them in ascending order.  //Java program to count words in a string.   import java.util.Scanner;  class SortStrings {     public static void main(String args[])     {         String temp;         Scanner SC = new Scanner(System.in);          System.out.print("Enter the value of N: ");         int N= SC.nextInt();         SC.nextLine(); ...