User Profile

Collapse

Profile Sidebar

Collapse
Ishan Shah
Ishan Shah
Last Activity: Mar 11 '21, 06:04 AM
Joined: Jan 4 '20
Location: Ahmedabad
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Ishan Shah
    replied to Print PDF from android using epson sdk
    in Java
    import com.epson.eposp rint.*;

    public class EPOSPrintSample Activity extends Activity implements OnClickListener , StatusChangeEve ntListener,
    {

    static Print printer = null;
    String openDeviceName = "192.168.192.16 8";
    int connectionType = Print.DEVTYPE_T CP;
    int language = com.epson.eposp rint.Builder.LA NG_EN;
    String printerName = "TM-T88V";
    ...
    See more | Go to post

    Leave a comment:


  • Ishan Shah
    replied to Error (3, 8, 13, 44); Java; IntelliJ
    in Java
    The name of the public class must same as the name of the .java file in which it is placed like
    Code:
    public class Demo{}
    must be placed in the Demo.java file. so either
    • Rename your file from Main.java to Demo.java
    • Rename the class from
      Code:
      public class Demo {
      to
      Code:
       public class Main {
    See more | Go to post

    Leave a comment:


  • Ishan Shah
    replied to Polymorphism in Java
    in Java
    Static polymorphism is a type of polymorphism, which collects data to call a method during compilation. Whereas dynamic polymorphism is a type of polymorphism that collects information for calling a method at the time of execution. So that's the main difference between static and dynamic polymorphism.
    See more | Go to post

    Leave a comment:


  • Ishan Shah
    replied to Exception in thread "main"
    in Java
    java.lang.OutOf MemoryError exception can also be thrown by native library code when a native allocation can't be satisfied. Following are the various cases when the OutOfMemory error might occur:

    1) Due to Java Heap Space
    2) When the GC Overhead limit exceeded
    3) Permgen space is thrown
    4) Metadata is allocated in native memory. if metaspace for class metadata is exhausted
    5) Requested array size exceeds...
    See more | Go to post

    Leave a comment:


  • Without getting the code of what you have done, we can't get the solution for you.

    But as you mentioned the class name caseconvert, I thought you want to convert a string into lower or upper case.
    If you want the same, you should follow the following code to case convert of string :

    str.toUpperCase ()
    str.toLowerCase ()
    See more | Go to post

    Leave a comment:


  • To generate the JWT token in Deno
    First, set up a Deno server to accept requests for it, we will use the Oak framework which is quite simple and a few lines of codes as following :

    Code:
    //index.ts file code
    import { Application, Router } from "https://deno.land/x/oak/mod.ts";
    
    const router = new Router();
    router
      .get("/", (context) => {
        context.response.body
    ...
    See more | Go to post

    Leave a comment:


  • Using switch case you can prepare the Menu driven program and first, you should post the code which you have done and mention where you have stuff to code.
    See more | Go to post

    Leave a comment:


  • Ideally, JSP pages can be indicated as threadsafe via the isThreadsafe page directive attribute. Setting a value of false will get the container to synchronize access to page-level objects. Definitely, it is still the responsibility of the developer to make sure that synchronous access to thread-unsafe regions of code.

    Additionally, the SingleThread interface has also been deprecated in the servlet specification release 2.4. The SingleThreadMod el...
    See more | Go to post

    Leave a comment:


  • Ishan Shah
    replied to How to set path in java
    in Java
    You should follow the following steps to set the java path:

    1) Type advanced system setting in the serach field
    2) Click on the View advanced system settings
    3) System property windows will get open, then click on Environment Variables
    4) In system variables click on the New button and enter JAVA_HOME as varible name and the path of your java JDK directory in Variable value
    5) Update System PATH by select...
    See more | Go to post

    Leave a comment:


  • Ishan Shah
    replied to Java Class and Object
    in Java
    If you are storing cellphone data (brand_name and price) in the array list then you can use the list.set() method by an object index number and new value which you want to be set.
    See more | Go to post

    Leave a comment:


  • The following code snippet will full fill your requirement :

    Code:
    if(salary>=20000)
    	    {
    	        deduction=salary*2/100;
    	        netpay=salary-deduction;
    	        System.out.println("User Netpay "+netpay);
    	    }
    	    else{
    	        deduction=salary*2/100;
    	        netpay=salary-deduction;
    	        System.out.println("User Netpay "+netpay);
    ...
    See more | Go to post

    Leave a comment:


  • Ishan Shah
    started a topic How to download pdf file of the user data

    How to download pdf file of the user data

    Hello!
    I am working on a task in which I have to download the data of the user, so provide me the basic code or reference for it
    See more | Go to post

  • Generally, Python throws NameError if the variable is not defined.
    so I think you have missed defining variable like x, i or j
    See more | Go to post

    Leave a comment:


  • You should take the integer input or convert it into an integer then perform the multiplication of integers.

    Code:
    mul=int(a)*int(b)
    or

    Code:
    a=int(input("Enter the value of a : "))
    b=int(input("Enter the value of b : "))
    mul=a*b
    See more | Go to post

    Leave a comment:


  • Ishan Shah
    replied to positive/negative integer/float
    in Java
    It giving the output after entering any number second time because scanner class methods hasNextInt and hasNextFloat method are check if the next token in this scanner's input can be interpreted as an int value using the nextInt() method or as a float value using the nextFloat() method.

    C:\Users\LENOVO \JavaInterviewP rograms>java Demo
    Please input a number : 2
    1
    2 is a positive, integer number.
    See more | Go to post

    Leave a comment:


  • Ishan Shah
    replied to How did you learn Java?
    in Java
    There is no shortcut to learning anything, and the same thing is for learning java. If you want to master the language then you have to set up it on your system and start the practice of it. Download and install JDK (Java Developement Kit),JRE(Java Runtime Environment) and any IDE with whom you are comfortable.
    See more | Go to post

    Leave a comment:


  • Ishan Shah
    replied to String Not equal Array element.
    in Java
    You can use contains method to achieve your requirement :

    Code:
    if(!Arrays.asList(arr).contains(user_string)){
    	...
    }
    In Following code, contains method returns false if it contains user_string in array else it will return true
    See more | Go to post

    Leave a comment:


  • Ishan Shah
    replied to sum in command line argument
    in Java
    First of all, You have to post the question regarding the code
    But as per your code, I think you want to sum the a,b, and c variable in which value comes from the command line argument
    So you should run the code by the following command in which the parameters are passed at run time

    javac N2.java
    java N2 4 5 6
    See more | Go to post

    Leave a comment:


  • The java.lang.NullP ointerException is thrown when a reference variable is accessed or de-referenced and is not pointing to any object. This error can be resolved by using a try-catch block or an if-else condition to check if a reference variable is null before dereferencing it.

    Following code will solve your problem statement :

    Code:
    catch (NullPointerException e)
    {
           e.printStackTrace();
    ...
    See more | Go to post

    Leave a comment:


  • This error is a compile-time error which arises due to curly braces. Typically, this error occurs when there is an additional curly brace at the end of the program. so I think you have additional curly brace at the end of your program
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...